Apologies in advance if I'm missing something obvious here. But to my knowledge, all the code: css, html and JS, are available to anyone visiting your website (or playing your game on the web). How do they prevent people from stealing the original content?
You can use obfuscating tools to make your code less readable. Also it's possible to make it harder to open devtools on your website.
But it is still not enough. You cannot just prevent somebody from doing something on the Internet. Everything you release to the web is accessible and copyable.