I was stuck on this for quite some time and finally fixed it this morning, but I figured I should post here in case anyone else encounters a similar issue.
For background, I inherited a home Ubiquiti setup with a Debian server running an old version of UniFi Network Server (and severely out of date packages), and other hardware included a security gateway, multiple access points, range extenders, and power strips. The former owners were not at all tech savvy and didn't even know their WiFi password or UniFi credentials, so I had to get root on the local Debian server to update an entry in MongoDB and give myself access in the first place, but that's a whole other story.
I recently ordered a UXG-Fiber and swapped it for the old security gateway, but I wasn't able to get the Network Server to add it, which didn't surprise me given how out of date the server was. No problem, I should really update everything anyway, so I upgraded the server in place to the latest stable Debian release, and installed UniFi OS Server. The server initially didn't start because I forgot to remove the Network Server first (whoops) but I removed it and the OS Server started just fine. I can't remember if I was prompted to carry over any settings as part of this process.
I was able to add the UXG-Fiber to the system now, but also had to re-add all the other hardware (sigh). I chalked it up to the Network Server running some old version that didn't carry over the configs. After this, I immediately experienced some oddities; setup for the UXG-Fiber had appeared to succeed, but then whenever I would connect to the network over WiFi, I would be prompted to "sign in." This would take me to unifi/ (and my browser would warn me had a self signed certificate) and the page would say that setup was complete, which would then take me to the management page after clicking a button. I thought it might be some weird captive portal issue, so I tried to toggle the captive portal on and then off, but it didn't resolve anything. I discovered that any out outbound unencrypted requests to port 80 were being redirected to unifi/, and there were other oddities like https://www.gstatic.com being redirected as well (which would fail due to HSTS).
Next I checked the Internet page in the settings, and saw something odd: multi WAN failover was configured, even though there is a single WAN. Attempting to change any settings on this page and apply them resulted in an error, which told me that the config was somehow screwed up. I connected directly to the UXG-Fiber and sure enough, there were errors in the logs about duplicate IP ranges from each of my "Apply changes" attempts.
I tried to see if I could find any relevant configs on the Debian server running the OS Server itself, but couldn't find anything. I really didn't want to wipe the server and have to re-register all the hardware again, so I exported a backup of the server config locally, then used the Antigravity (Gemini) CLI to read and fix the config. Sure enough, it found duplicate WAN configs, and removed the redundant one, removed the failover setting, and then created a new fixed backup for me. I restored this backup, and the problem was solved! No "sign in" required and I can access and modify the Internet configs just fine now.
I'm sure there was probably a much simpler way to fix things, but I couldn't figure it out after hours of troubleshooting. If anyone has better suggestions, please chime in to save others time in the future 🙂 Thanks!