I think we are using the term “overlay” differently. The text and graphics that your code generates *should* be present in the output for *all* settings. The switch setting “OVERLAY” means that the input should be included in the output such that the text/graphics is overlayed on top of it.
If the video input is passed to the output when the switch is set to SYNC ONLY, then there is a short. Have you looked at the soldering for the switch and jumpers?
I expect garbled overlay when the switch is set to SYNC ONLY and the jumper is across the middle pin and leftmost “D9” pin. You are connecting the jumper so that it connects the middle pin and either the left pin (for D9) or right pin (to use the sync signal from the input), correct?