Arduino HC SR04 distance sensor still works even if not connected to gnd
I strongly suggest that you use the components as they were designed to be used. If that means to add the PNP transistor to shut off power to a part of the circuit then do it. The transistor and the possible bias resistors needed are not expensive.

Establish your design techniques to follow data sheets, use conventional  practices and try not to cheap out at every turn. Do that and you will have success in your endeavors and gain the respect of your peers as one who can make reliable working circuits.