That is to be expected. When the phone is in standby and not connected to an external power source, the WiFi radio will be powered down. If it didn't do this, your battery life would be drastically reduced.
But before the iOS 11.2 update it never did it and this is a ne device and it was at standerd iOS update and stayed on wifi when the screen is turned off but as soon as I updated to iOS 11.2 it started it again again a new iPhone from the other one doing it to
Whether you realized it or not, it's always done that. It's done that for 10 1/2 years, since the very first iPhone. It seems with every new iPhone that comes out or every iOS update, there is a rash of complaints about this very same thing. Trust me, it's always done it. For some reason, you just didn't notice before. Maybe it's taking a second or two longer to reconnect when you wake it, and that's why, but the behavior hasn't changed.
Are you saying that you had Wi-Fi disconnects with a previous smart phone, not just with your new iPhone 7? ... and if so, is this with all Wi-Fis or just a particular one?
Huntherdrone24,
See if this helps:
If your iPhone, iPad, or iPod touch won’t connect to a Wi-Fi network
Wifi disconnet