I have had problems with G5s plus WiFi dropping and I have found out the solution by myself. please share this solution so that people with this problem can use the phone without any hassles.
Open Settings > System> Developer options. (In case you don’t see it, go-to about phone and tap build number multiple times. You should see Developer options enabled). Scroll down to Always allow WiFi roam scans and enable it. This should fix the WiFi drop issue.