Is there anything else in your .css file? If you switch to the default theme and disable other CSS snippets, do your see the same? Using only that snippet and the same content in a new vault, what does it look like? I’d try doing that to see if you can suss out the cause.
No, bug reports aren’t accepted using a community theme or CSS snippets.
I still can’t reproduce what you’re seeing. Can you explain exactly what you are trying to do and share an example in a code block of the content being embedded?
It looks like you’re removing borders, paddings, and margins from embeds to make them “clean” or “flush” with the host note.
Give the following snippet a try. Of course it may need adjusting to your taste.