A bit hard to understand you but no iOS does not disconnect all the devices when you lock the phone. I often use hotspot because the internet at work is shit. My phone does not have to be unlock all day, that would be stupid.
I think iOS does disconnect the device if there is no network activity after a certain time but I am not very sure about this. Correct me if I am wrong.