Is hiding source code in plugin possible?

You might be able to build the code you don’t want to provide as a DLL and link to it in your plugin. You’ll have to change your .build.cs to do the linking instead of building of that source.