Margins on IMG element breaks IO

If I set margins for img it breaks IO cards. To be precise, the positions of masks change.

Is there any chance we can get this fixed on Anki’s side? Such that, the masks always remain on the same position regardless of the modifications made on image?

I think apart from margins, it should also cover changes in width.

Related: Image occlusion doesn't scale when page zoomed in · Issue #2588 · ankitects/anki · GitHub