Of course it will - switching off the light removes the power from it!
If you want it to stay on you need the type with an independent live feed (as well as the pull cord input) and a timer. Fitting one of these to a bathroom is a job for a qualified electrician.
t
June 2008