Sam is correct. You may be able to disable some of the device's power save features (such as screen dimming, etc.) but the Wi-Fi element of the device will still sleep if the device is in a state where connectivity is not required, such as when the screen is locked, and therefore user interaction isn't possible.
This is common and standard on all mobile phones. I just checked my iPhone6s which was active less than a minute ago but the screen had turned off and was locked and when I hit the home button Wi-Fi was disconnected.
Why is it you need connectivity even when the the screen is locked? Which mobile OS are you using?
Thanks,
Darrel.