This is a known bug. Use 22.03.6 until 23.05.3 is released, which will contain the fix.
A sysupgrade is going to fail because the bug prevents OpenWrt from writing to flash including writing a new OS. It will be necessary to TFTP recover to stock and repeat the installation process.
I'm new to OpenWRT, just flashed my Ubiquiti Nanostation AC Loco, found out that there's not enough space and that settings revert after turning it off. Any ideas on how to fix this?
Space is not the reason for the problem. If you read the discussion in this thread (in fact the post right above yours), you will see that there is a bug.
The current solution is also in that post -- roll back to 22.03.6.
I didn't mention this but before I tried the factory file I also did try the sysupgrade from the same link, but will re-try it again right now, apologies for not mentioning it.
A little bit of update. As sir @mk24 recommended I TFTP back to stock Ubiquiti WA.v8.7.4, and from there reinstalled 22.03, and was able to flash it successfully, gained a valuable experience as I'm basically a newbie.
I compiled openwrt 23.05.3 including luci for nanostation AC loco WA.v8.7.4 ... worked for me. Just want to share ... perhaps it will be helpful to someone. You can download the firmware here: (deleted)
To install, just follow the instructions provided here.
[Moderator edit: link disabled, but available for people to see - we do not know if it is a legit link and/or what is in the build]