They are different queries.
In the first query, the one that doesn’t work, you’re requiring that MyModule.Object is associated with any UserRole that is not SomeRole. If you check the access rules for System.UserRole you notice that users may only see their own role or “grantable roles”, that means, roles they are allowed to assign to users according to their user role settings in the project security. These access rules prevent your query to work correctly, if you’re retrieving on screen or in a microflow with entity access enabled, unless you are Admin and may see all the roles.
In the second query, you’re requiring that MyModule.Object is not associated to SomeRole, which is a different question and one that you're apparently allowed to ask. So you get an answer. If MyModule.Object is not associated to any UserRole, it will still be in the results. In the first query, if it worked, it would not.