Adding prefix to WordPress database tables breaks admin capabilities?

In the $wpdb->prefix_usermeta table, there is a meta key called $wpdb->prefix_capabilities.

When users are created, the $prefix is hard-coded. You have to also edit the $prefix to the new one there.

So in your example

wp_capabilties becomes stx_capabilities. You must update it for all users.