This is strange. It works and scales fine on my 4K monitor connected to either of two PCs (one is Win11 the other is Win10) with either your fix or mine, but the customer is still having the same issue as does another customer that only has HD monitors. Both customers have multi-monitor setups as do I, and each monitor is set at different scaling.
Is there anything in your code that does something different on UHD monitors that isn't being done on HD monitors when it calculates the DPI Scale in GetDpiScale? Tomorrow I'm going to dust off an HD monitor I have to see if I can duplicate, but just thought I'd ask before I go to that trouble.
One thing they do that I have also tried is that they change the font size in the TreeView to something larger than 8... either 10 or 12, in which case I then set the ItemHeight to that times 2. But again, works fine for me.