I know I'm a bit late to the party, but I just had the same problem as you and your solution didn't work unfortunately. What I instead had to do was connect a +5V wire from the regulator to the FC, along with the ground wire that you connected.
I wasn't really satisfied with only solving the problem; I wanted to know how the OSD could flicker without affecting the rest of the video at all, and I think I have figured something out.
In both our cases the underlying problem was that the ESC (where the FC and thus OSD chip got it's power from) introduced noise in the output from the built in 5V regulator, which in turn causes a ground loop (At least in your case. In my case it might just have been a deficient regulator). When arming and applying throttle, the motors draws more current which in turns generates stronger magnetic fields that messes with the other electrical signals. This explains why some people (including me) can experience even more flickering when the motors spin faster.
But why is only the OSD affected by this problem, and not the rest of the video?
I haven't found any sources about this, so the following is just my hypothesis based on the information I could find, and what I already knew.
If we take a PAL signal for example, and black and white to make it easier (NTSC and PAL are the two types of systems used for analog FPV video, both quite similar), it uses the voltage level to determine the luminance level of each pixel in each scan line, where 1 V is completely white, and 0.3 V is black. 0 Volts is used as a so called sync pulse, and between each new scan line there is a sync pulse.
My suspicion is that because the OSD chip in the FC effectively receives a different signal than the camera sent (because of a difference in potential between the two grounds*), it can miss sync pulses, and the OSD will appear as slight noise in the final image instead. Another theory is of mine is that the OSD chip will just give up when it doesn't receive what it expects.
When the signal finally comes to the VTX the ground potential is the same as the cameras, and the signal will be correct again (possibly with some unnoticeable noise).
*For example: imagine that the camera sends out a signal of 0.6 V. If the potential of the OSD chips ground is 0.1 V lower than that of the camera, it will interpret the signal as being 0.6 - (-0.1) = 0.7 volts.
I want to make it clear that this is just my (relatively) qualified guess, and you would probably have to measure the signals and know how the OSD chip works to know exactly what is going on. I would love to test this some more but unfortunately I don't own an oscilloscope, and a multimeter isn't really up to the task. Also, i would love to be proven wrong.