The main reason is that there are too many host rules configured for ssh, and there is no precise matching set. Additionally, with multiple keys present, ssh attempts each one, and before a successful match is found, the server rejects the connection due to too many failed attempts.
Solution: Add precise matching to the host matching rules.
# ~/.ssh/config
Host gitlab.xxx.com
HostName gitlab.xxx.com
User root
IdentityFile ~/.ssh/other_rsa
# Add the following line for precise matching of the corresponding key
IdentitiesOnly yes
# And do not use any agent
IdentityAgent none
# GitHub
Host github.com
# for 443 port
HostName ssh.github.com
User git
Port 443
IdentityFile ~/.ssh/viki_rsa
IdentitiesOnly yes
Host *
User root
IdentityFile ~/.ssh/viki_rsa
PreferredAuthentications publickey
IdentityAgent "xxx"