Dialog: Apply `overflow: hidden` to contain the resize handles

Fixes #9521
Closes gh-1092
(cherry picked from commit 7741c9f678088a129c1782f4e7f061bc12a41279)