I work in television. We make a lot of mxf/mp4 renders. We noticed renders in Media Encoder crashes (ae 2019/2020) a lot when you close After Effects during the Media Encoder rendering. (When we render same project and dont close AE, everything is fine).
Same project in AE 2018 never crash, with or without AE working same time.
We try rendering on GPU and CPU same resoluts.
It makes sense why Media Encoder wouldn't like having related applications close while it's encoding. I would recommend not doing that in the first place. If you really want to do root cause analysis, check the Event Viewer or use the sysinternals tools: https://docs.microsoft.com/en-us/sysinternals/
This issue sounds pretty strange to me. Ideally, the export should not get affected even if you close After Effects. I just tested it at my end and it worked.
Looking forward to a response.