I see. That cursor shape is called "ibeam". The "caret" is the line at the cursor position while the TextEdit is focused. Sadly I don't know how to fix your problem. :( Somehow the Viewport-Container gets the input event all the time, even when the ColorRect is on top, while the ColorRect itself seems to never get any gui_input
. Might be a bug. Either way it's beyond my understanding of viewports and input events...