This is a known issue, and the answer to your question can be found in the so-called Text Tool Thread, where things like your issue are discussed. There you’ll find the answer to your question as well as the current workaround for it, because the fix is currently “announced” for Krita 5.3.x which will need some time to arrive. Therefore, the following two postings in particular should be of interest to you:
The current solution/workaround is to use Krita 5.1 for tasks like this. Since you have not named your operating system as required in our FAQ for questions like this, I can’t tell you the version you need for your system, but if you are As a Windows user, you can use the portable version for this task, this way you don’t need to uninstall your current installation of Krita, the portable version uses the same settings as your current installation, but you can only run one version at a time.
You can find it in the attic:
Michelist