You make it work as root by leaving the configuration alone.
MacUser2525:~$ cat .ssh/id_rsa.pub
ssh-rsa AAAAB3N
MacUser2525:~$ ssh [email protected]
Linux buster-raspi 5.9.0-0.bpo.5-arm64 #1 SMP Debian 5.9.15-1~bpo10+1 (2020-12-31) aarch64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Feb 23 22:22:43 2021 from fe80::1003:5492:80fa:2bc5%eth0
root@buster-raspi:~# cat .ssh/authorized_keys
ssh-rsa AAAAB3NzaC1
With this setting you enabled you have allowed root to login with a password.
root@buster-raspi:~# cat /etc/ssh/sshd_config | grep Root
#PermitRootLogin prohibit-password
# the setting of "PermitRootLogin without-password".
These are not needed to be changed as well.
root@buster-raspi:~# cat /etc/ssh/sshd_config | grep Pubkey
#PubkeyAuthentication yes
root@buster-raspi:~# cat /etc/ssh/sshd_config | grep Authorized
#AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2
#AuthorizedPrincipalsFile none
#AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody
In short I have nothing set that you do only the defaults that load, the contents of my id_rsa.pub
in the /root/.ssh/authorized_keys
file allows me to login as root. At least the guide you follow has not told you to change the port. This will only work if the root user is enabled on your Pi I see nothing saying you did this.
sudo passwd root
That sets your root password and enables the root user.