I want to remove (or hide) the “Active theme” buttons (Customize, Widgets, Menus, GeneratePress) from themes.php.
Any particular reason why you want them removed? These buttons access the exact same options you see under Dashboard > Appearance. Removing these seems pointless if you don’t remove options under Dashboard > Appearance as well as these buttons can be accessed regardless of the buttons removal.
I assume these are added by GP, not WP, but I just can not find where in the source code.
No, this is added on WordPress core files (themes.php). Here’s the actual code for this. See line 279 onwards.
We don’t recommend editing this. Also, WordPress core issues are out of our scope, unfortunately.