WindowsElement in a docked window

Hello, I am using Windows Application Driver for a winforms windows application in C# programming language. My application is always on the top as in winforms I set the property

_myControl.TopMost = true.

A feature of my app is to dock the window on the top of the screen(also Bottom, Right and Left). Before docking the windows, I can find an element(it is a MenuItem) with

driver.FindElementByName("MyElement")

After I dock it to the top, the call to the same instruction throws OpenQA.Selenium.WebDriverException: An element could not be located on the page using the given search parameters.

I tried also FindElementByAccessibilityId and FindElementByClassName but with no success. Calling

driver.FindElementsByXPath("//*")

gives as a result about 80 elements before the application is docked and only 7 when it’s docked. I can see all the content of my window on the top of the screen but I cannot interact with the window. Can you please suggest me a solution?
Thanks and regards