If the noise stops when you turn the car off, that means it's something driven by the motor and not attached to the wheels.
The wheels and many transmission parts are still moving when you turn off the car and coast. Therefore let's list out what stops when you turn off the motor.
Power steering pump
Alternator
water pump
Torque converter
AC compressor
Trans pump
One thing that comes to mind is if your power steering rack has an issue you might be getting noise from it which will stop when a ps pump is turned off.