When a non-local user changes his username in Gogs, the user can still log in using their original username and password which will auto-registrate a new account. The original account is still accessible using the changed username. This means that there are now multiple accounts for the same user.
In my opinion, the best solution would be to disallow changing the username for non-local users, because it will always lead to confusion (user may expect that username is changed globally).