Microsoft's WSL2 Now Supports Memory Reclamation
Under WSL2 (the more VM-ish version of Windows Subsystem for Linux), RAM would be allocated to WSL2 as needed by the host. However, up until now the memory assigned to WSL2 would not be returned to the host after it's been freed.
As of this week's newest Windows Insider Preview Build, WSL2 is able to return that excess memory back to the host and thereby dynamically shrinking the VM RAM allocation based upon the needs.
More details on this WSL2 memory reclaim support via the Microsoft Command Line Blog.