It sounds like your PC is only "seeing" and listening to the HDMI connection, and the VGA output just happens to work also as a mirror or duplicate output.
When the tv turns off, the PC sees this and turns off it's video output, apparently not "seeing" that the VGA is still plugged in.
I'm guessing that it's a hardware issue, when I read the manual for my MSI motherboard, it had built-in video too but only "officially" supported one output at a time; there were even jumpers to select either HDMI or DVI but definitely not both at the same time. It sounds like you're lucky that HDMI and VGA both work at the same time, they probably weren't designed to be used together, probably because of reasons like the "bug" you're seeing now.
I don't know how to "fix" it, maybe a physical switch that disconnects (at least some of the wires in) the HDMI cable so you wouldn't have to unplug it, a multi-monitor or multi-PC switch, or a home-made switch?