Change WordPress user roles and capabilities › Forums › Bug Reports › Plugin access addon editing doesn't take effect immediately on new users. › Reply To: Plugin access addon editing doesn't take effect immediately on new users.
Let’s clarify the things:
2 things should be made together:
1) use beta version of URE which includes a fix;
2) properly install a custom code (you listed above).
I see that your site uses currently the stable version of URE 4.50.3. It has a related issue after WordPress 5.1 release and discussed feature does not work under it.