This might be an interesting read: https://devblogs.microsoft.com/oldnewthing/20101230-00/?p=11873
Do you test with disabled child windows? Because that's one case where WindowFromPoint fails, it won't check deeper child windows even if they are active in this case. Not sure if Windows treats it differently here.
BTW I'm not sure about this but I think GetAncestor(hwnd, GA_PARENT) is more appropriate since GetParent can also retrieve the owner window, not sure if that's a factor here, but seems safer to me.
You probably missed my newer message in this thread. WindowFromPoint fails with the static controls as well. So, the drag&drop operations needs special implementation, as I have hade it in the discussed patch.
Also, thanks for the hint about GetParent. I will think about it, but at first glance, we really don't need owner windows to be messed in drop target search. So, GetAncestor looks better. Will test it.