Hello,
Several users have experienced this same issue; therefore, this could be a bug involved. One user recommended giving the beta version on TestFlight a try, as they found it to be compatible with the Magic Keyboard.
Here's the link:
Join the Remote Desktop Mobile Beta beta - TestFlight - Apple
If the Answer is helpful, please click Accept Answer and upvote it.