At this point I believe that MFC versions after the one included in VS2010 fail to manage activation contexts contrary to the published documentation (e.g., AFX_MANAGE_STATE, support-for-activation-contexts-in-the-mfc-module-state). The docs also refer to functions and headers that do not exist in the VS2017 and VS2019 supplied versions of MFC such as AfxSetAmbientActCtx and afxcomctl32.h
Also, take a look at vs2015-mfc140dll-deactivates-my-activation-context-due-to-isolation-aware-how-to-fix. I forgot about this thread -- the activation context problem has existed for quite a while.
I suggest you open an issue with Developer Community and provide the minimum sample that you have already created. If you do open an issue please post back with the link so we can upvote it.