The text remains a part of the document, but it doesn’t appear unless you choose to display it.
Have you tried it out for yourself?
If there is hidden text, you could also go to File > Options > Display > 'Always show these formatting marks on the screen' > Hidden text > OK.