Double title bar with weird red border

Sometimes when I grab a gtk3 window (like firefox or dconf editor) from maximized status to the middle of screen, the window will have double title bar and some weird red border
Screenshot%20at%202019-05-08%2010-41-36

Sometimes only the red border is displayed like this