When adding a custom attribute to an element, this attribute is rendered on the element on frontend, but not on the element in the builder.
This may not be a bug, but a deliberate choice, but. when this attribute plays a role in the element styling, this results in incorrect visual aspect in the builder when frontend is actually correct.
So, when a custom attribute is added to an element, it should ideally be reflected in the builder-iframe document.