It doesn't seem easy to add an automatic test to demonstrate the issue. Attached is a sample program to reproduce the bug visually. [test.zip](/uploads/614d1a4b43a26fcb08e22192554ea51f/test.zip)
Also, attaching a picture comparing the results on Windows and Wine.