Disable automatic switching to 4G from WiFi which doesn't have internet connection Have iPhone which is connected to WiFi network which doesn't have access to internet. iOS apparently detects that there is no internet and tries to disable WiFi for a short period of time and connect to 4G.

Noticed it because iPhone is connected to AirPlay device and music is stopped every ~15 minutes and when I check the connection I see 4G, but not WiFi.
Put your iPhone into Airplane Mode to disable the cellular connection. Then re-enable Wi-Fi networking (you can do this even in Airplane mode). This will cause it to stick with the Wi-Fi network.