"Role does not exist" error when granting usage on public schema, but role does exit
Your problem is that the role you are after has capital letters in its name.  Mixing cases is usually a bad idea in PostgreSQL, because you need to double-quote such names.

So your grant should look like

GRANT ALL ON SCHEMA public TO "MyRole";


I'd suggest renaming that role to "myrole", to avoid such problems later.