Many programs get automatically minimized if a user opens a sub-window in it.
It happens if the Tablet mode is enabled.
Click on Action Center present Taskbar notification area.
Click on Tablet mode to disable it.
You may do the same via Settings > System > Tablet mode > Change the slider from on to off position under “Make windows more touch-friendly when using your devices as a tablet”