Thanks for your reply.
Switching Apps is a known procedure for me, and for very sure after the upgrade to iOS 15 Safari behaves different in keeping the connection alive.
Long ago (I cannot recall when) with an iOS upgrade, probably to iOS 12, I could Switch away from Safari to e.g. read an incoming e-mail or WhatsApp message and return to Safari without it being disconnected from web application. The time I could Switch away from Safari was at least a minute. Now Safari disconnects right away (within the time I can Switch away and back right after another).
Safari only lost connection when the iPhone went in Auto lock after the set time (5 minutes for my iPhone).
Now with iOS 15 I don't get an iPhone error message, the error message (as being disconnected) is within the web application that I run in Safari.
I checked the Background App Refresh setting, it was off. I did set it to On for both Wifi and Cellular, but there is no separate Safari entry to enable Background App Refresh.
Background App Refresh set to On did not make a difference.