Thank you for your reply. I checked the scale settings and it is 100%.
My screen resolution is 1920×1080 (full HD). I am using Windows 10.
I also checked the program in another version of Python (3.8).
After a slight correction of the source program, the same error is there. The error appears to be caused by the tk library.