The text in the GUI does not vanish. Only the text on the sign block itself.
If you type a blacklisted word on a sign (anything that would be censored with ****), the text appears on the sign in the world as is (with words censored as ****). But when you exit the GUI, the whole sign turns blank instead of the blacklisted word simply being censored with **** and the rest of the text remaining visible.
However, certain clean inputs can trigger this issue such as:
§a■■ ON ■■
§c■■ OFF ■■
*This example renders properly in non-realms worlds
Note the formatting codes. Formatting sign text with § seems to be the cause of many examples like the one above; although, I'm not sure if this is for the same reason swear words create blank signs. One way to consistently trigger this bug with clean words is to have text formatted with § on the 5th line of a sign. This should cause the in-world sign to go blank in most cases.
*The example listed above may trick the sign into thinking the 4th line bleeds onto the 5th, as the formatting codes may be interpreted as actual characters (like they are in the GUI) resulting in the OFF line actually being on the 5th line, causing the issue.
*In the GUI, the formatting codes will appear faded, but will still take up space in the GUI. In the example above, this will cause the OFF line to be visually on the 5th line.
It is worth noting the text on the in-world sign will appear properly in both swear and non-swear cases for a brief moment when a character is typed. This suggests an sync issue where the server is not properly receiving / interpreting the client's input, and is re-updating the client with blank data.