Why Does My IPhone Disconnect From WiFi Every Time I Lock It?

Why does my WiFi keep automatically disconnecting?

.