There are different methods:
1. Open Settings menu and click Wi-Fi. Touch and hold for a while your network connection. Soon you will see an option saying “Forget Network Connection” will appear. Click on it to proceed.
2. Turn your Xiaomi Mi A1 WiFi data on. After this go to Settings and click Wi-Fi. You will see an option a tool like an icon at the top right corner. Click on it and disable the smart switch option simply.
3. Open Settings and tap Wi-Fi. At the top right corner, you will see an option “More”. Click on it and then click “Advanced”. From the pop-up menu, select “Always”

Hope one of these works!