CiviCRM WordPress Member Sync - adding a new role or changing an existing one
The CiviCRM WordPress Member Sync plugin provides basic sync functionality and does not necessarily cover all possible use cases. What I would do in your case is use the civi_wp_member_sync_add_role hook to capture which user is being assigned which role. You can then remove the "Membership pending" role and make sure they only have the "Membership granted" role.