While you can do source padding or disabling right click to prevent users from checking your page source the normal way, there’s an easy workaround for this.
While Googling things will offer solutions like HideJS, these aren’t exactly made for WordPress. It’s pretty much out of GeneratePress’ scope of support.
A wise man once said:
"Have you cleared your cache?"