You shouldn’t rely on the custom element size as appear in the editor but define it explicitly using CSS string on the custom element page.
P.S. the preview mode doesn’t reflect the way it’ll be displayed on the live site (as it;s wrapped in an iframe when it is in preview mode),