Check the version of strapi/user-permissions package - make sure that it is 4.16.2
This worked for me