If you wish to change a default behavior of User Role Editor independently from a theme you can setup this code as a Must Use plugin.
Create a .php file, start it from < sign on the 1st row. Copy/paste a code there. Place that file to wp-content/mu-plugins folder. That’s it.