Is simply having/taking drugs even child endangerment? Sure, the stereotype of a drug addict is someone wildly neglecting their kids, but I can totally imagine ways that someone could use drugs while still being a good parent. It’s not like every drug user is an addict. Drugs aren’t all the “pass out while your kids go hungry” type either (stimulants like cocaine are basically the exact opposite of that).
The mere existence of drugs shouldn’t mean anything.