Today, I installed Version 2409 (Microsoft® Excel® for Microsoft 365 MSO, Version 2409 Build 16.0.18025.20030, 64-bit). With this update, memory is now being released properly.