modal: don't add margin & padding when sticky is not full width (Backports #30621) fix #27071 (closed)