Can you attach the full log as an attachment? The current short log does not show what apt told you in the beginning about what it plans to do, nor can I see if mariadb-client-10.5 was uninstalled or what happened.
But it did at least hit a bug where the uninstall fails on `invoke-rd.c stop mariadb` failing. Is your system running systemd? What can you tell about the environment?