If your laptop keeps disconnecting from WiFi, then it could be the power issue. After turning off both these options, restart your PC or laptop once. It allows Windows users to connect to suggested open hotspots. Then, your internet will get disconnected and, WiFi will try to connect to that network.
QUICK FIX - Wi-Fi RANDOM DISCONNECTING PROBLEM - WINDOWS 10 Means, if your WiFi signal is weak, and there is another open WiFi. Note : Unfortunately, In the latest version of Windows Which is designed to stay connected to powerful WiFi Connection. So, you can also read this article - Fix WiFi connected but no internet access. This problem can occur due to multiple reasons. And, after few seconds or minutes, it automatically gets connected.