How to start micro controller using transistor
What's happening is that power is flowing into VIN, and it has nowhere to go, so GND is floating up until it's equal to VIN.

The sensor OUT will never lower than GND due to protection diodes so you end up seeing VIN at the output.

I would recommend using a high side switch to solve this problem. Like this: