Thanks for the report.
The memory usage on the empty Release sketch is unrelated to Visual Micro and is how the Arduino core software is built , which is identical in the Arduino IDE.
From the log the Optimization is already at its smallest for the code size as well (-Os).
One option to gain more memory would be to change to a more modern MCU which has more memory available to it (e.g.
Teensy 4.1 has 1024K of RAM available with expansion for additional PSRAM also available), which also offers a vastly higher CPU speed as well (up to 1Ghz!). I have assumed no WiFi or Bluetooth functionality is needed as with the Arduino Zero.
The only alternative to stick with the same chip would be to do away with all Arduino core functionality (and optionally the bootloader to save on code space) and program it directly in e.g. AS7 in C++, which would require more knowledge as none of the helpers provided by Arduino (e.g. digitalWrite(), Serial.println() etc) will be available and are often chip specific when working with registers etc...
We have identified the issue with the FreeMemory reporting not working, which we can send you the files to resolve, however this functionality itself will consume some code space and memory to work, which may not be desirable if your code is expected to be very close to these limits. Let us know if you want us to send these over.
Finally, it is also worth pointing out that some microcontrollers preallocate memory. This means that adding "some" code does not increase the size of the memory usage. The serial buffer(s) can sometimes be a good example of that. Again, this is designed within whatever board package you have installed, in this case it is the Arduino.cc SAMD core.