Here are some steps to try to resolve a Smart TV not staying connected to Wi-Fi:
Check the connection between the TV and router or modem.
Restart the home network by powering off the router and modem for one minute and then powering them back on.
Check the TV’s Network Settings menu and make sure that the right type of connection is selected.
If home networking equipment is used, check the user manual regarding how to reset it.
Change the channel of the router if using a wireless connection. Check the router’s user manual for how to do this.
Check if your TV is running the latest version of software.
Test the connection to the wireless network.
Update the TV’s firmware if a new version is available.