Diagnosis
This is often a power-saving or IP address conflict issue with your router. The TV's network adapter might be going to sleep or getting a bad lease.
How to Fix It
First, change the TV's WiFi power setting. Go to Settings > Network & Internet > your network. Click the settings icon next to it and look for an option like "WiFi power mode" or "Use adaptive WiFi." Turn it OFF so the connection stays active. Next, give your TV a static IP address in your router's admin settings, or set a reserved IP based on its MAC address (found in Settings > About > Status). This prevents address conflicts.
If That Didn't Work
Try forgetting the network on the TV and re-adding it. If possible, test with a wired Ethernet connection. If the problem disappears, the TV's WiFi hardware might be faulty.
Heads Up
The QM8 supports both 2.4GHz and 5GHz bands. If you're on 5GHz and have a weak signal, it may drop more often. Try the 2.4GHz band for a more stable, if slightly slower, connection.