As per info placed in bug report in simple-swipe-card and card-mod issue, bubble-card may need auto prepend (new 4.2.0 feature) due to how bubble-card renders and how Lit framework may then remove card-mod. As bubble-card uses ha-card but not wrapped by hui-card, card-mod is prepended in ha-card light dom. This then makes the bubble-card content get negative margin as it is no longer the first child. See issue link for more details.
A theme based workaround is included in the card-mod issue. As to how to have card-mod fix in code… I will need to consider how this is best done.
If you have card-mod intstalled it will always add to the DOM as an element so it can respond to new themes which may have card-mod elemenets. In 4.2.0 prepend is automatic when needed as otherwise styling cards that need it, that you can’t add config to directly (e.g. energy cards on built in energy dashboard), would not be able to be styled as you can’t set prepend in any config.
I have submitted a Frontend PR to only check for .card-content being first of cards with class .card-header and .card-content, which is really what the :not(:first-child) of current ha-card is checking for. If accepted then next HA release will be compatible with 4.2.0(-beta).
EDIT: Frontend PR has been accepted so once the PR makes it to a release there will be no problems with 4.2.0 and bubble-card in simple-swipe-card. If the PR does not make it into a 2026.1.x release then it will be in 2026.2