I wouldn't have thought that you would get an OOM. This last test is quite large but it should have fit into ram without OOM (takes 1.5Gb of memory). Maybe the .net runtime set a lower threshold of memory pressure for your config, or a memory fragmentation issue (I have a 32GB ram here).
Thank you to have taken the time to do the test!