If I may add to the confusion... recently we stumbled upon a similar problem. My application likes to store its position and size in an xml file when closing the application. So I can restart the application restoring the same location and size when you last left the application. That works fine, when I maximize the applications main window (MDI application) it works fine too. But when I restart the application the size of the window is too big, some 15 pixels (lines) of the bottom are now obscured behind the taskbar. Re-applying the maximize button, restores all back to normal.
So something's off somehow in reporting the size of a window when maximized. Now I stumbled upon the fact that when you right click on the taskbar (Win10 pro) and you uncheck the 'lock all taskbars' feature, the problem disappears and all works fine. So either this is a bug in windows or somewhere in wxWidgets (somewhere deep I assume).
Hope this shines some extra light on this matter.