How to sync user database with “user role editor” plugin enabled

User roles and associated capabilities are all stored in the $prefix_options table in the $prefix_user_roles (note that in both of these $prefix is a variable, so if your $prefix is foo_, your table will be foo_options). You need to sync this value between databases. As far as I’m aware, there is not a way to sync just this one option beyond connecting to the needed table for it. You will likely need custom SQL for this.

User capabilities should already be synced, as these are stored in the $prefix_user_meta table, and syncing that table was covered in the answer that you linked to in your question.