I've just tried in Telegram, and can't reproduce this problem! 😕 Any ideas what might be different about your setup?
What software keyboard are you using? That seems to have an effect on physical keyboard input somehow, e.g., sometimes while my selected software keyboard is
Swype (installed from an old APK, given it's not on the Play Store anymore), using the Shift key on the physical keyboard strangely does not capitalise (I haven't yet worked out how to consistently reproduce this). When I disable Swype, it comes good.
I've tried to reproduce your issue with and without Planet Keyboard being the only enabled keyboard (Settings -> System -> Languages and input -> On-screen keyboard -> Manage on-screen keyboards). In case it makes a difference, I'm using the 'English (US), Gemini keyboard' layout setting (Settings -> System -> Languages and input -> Physical keyboard -> Integrated keyboard) - though I think that might have been selected via the 'Planet Keyboard' app's wizard.