There is RouterBOARD firmware (a.k.a. routerboot) which is similar to BIOS/UEFI on PCs. And there is RouterOS (a.k.a. ROS) which is similar to Windows/Linux/... on PC.
The Upgrade button on screen shown upgrades routerboot (the "BIOS") to version, shipped with currently running ROS.
"Upgrading firmware from packages" is upgrading ROS (the "Windows").
Thanks for clearing that up.
I don't think it has anything to do with flash becoming full. The original problem is more likely due to some glitch in configuration database and which might be present since many upgrades ago. And to fix that glitch, the only sure way is to netinstall device and reconfigure it. Don't use binary backup to restore config, it seems that problems with configuration database are carried over in these backups. You should save textual export of configuration and use it to replicate config after netinstalling device. In theory it should be possible to import the file but it doesn't always work. All of it can hardly be done remotely (not impossible, but very, very hard).
I've come to a similar conclusion by a different method. The very first routers we configured were done with the cut and paste method or using the import command. This was not always successful. On subsequent routers we reset the configuration (after ROS upgrade to 7.x) with no defaults and selected the configuration script to run after reset. AFAIK this has been 100% successful.
Still the issue with doing this remotely is the only access I have access to the router through WireGuard. The router is using a cell modem so I never know what its real IP is. If I reset the config I will loose the VPN connection because when the WireGuard interface is recreated the public/private key will change. I've determined that I can export the private key for the WireGuard interface. If I add this to the script that I run after reset I should be able to connect. Tested today and the remote configuration reset worked without loss of VPN connection. Will try it on the remote customer router later this week to see if that clears up the configuration problem.