It looks like Firefox is adopting this same feature with its new redesign due out soon. It's completely absurd. I cannot possibly see how having a window frame inside a window frame is good design.
In the case of Edge, don't know what OS you're on, because it seems like on Mac this cannot be changed any longer. If on Windows, there still exists one method to remove this. Make a shortcut to Edge, and right click it, go to Properties, add a space to the end of the Target box then put this there "--enable-features=msForceNoRoundedCornerAndMargin" without the quotes. If you have Startup Boost enabled it may not take effect instantly since Edge doesn't fully close.
This method still works for me on Edge 151 and Windows 10, but they could remove it at any moment.