Enabling free form windows in android O causes buttons in recent apps menu to overlap

I have searched for a way to enable free form windows. I’ve used the adb way,

adb shell settings put global enable_freeform_support 1 

But I couldn’t use it because the close button is overlapping free form button:

screenshot

My phone is Huawei P20 Lite (ANE-LX1) with EMUI 8.0.0 and android 8.0.0 with nova launcher. Close button works like a charm when clicked

Any ideas what to do (rather than disabling the free form ) ?

It is okay to replace closing button with free form button if that’s available.

Any solution without root is preferred.