Mobs riding large entities can still attack players who are out-of-range
The Bug
Mobs riding large entities, such as a zombie riding a sniffer, can still attack players who are completely above the vehicle and out-of-range of the passenger.
How to reproduce
- Summon a zombie and a sniffer, then execute /ride @e[type=zombie,limit=1] mount @e[type=sniffer,limit=1]
- Build up 3 blocks from the sniffer's position
- Check the range the zombie can attack you from
Created Issue:
Mobs riding large entities can still attack players who are out-of-range
The Bug
Mobs riding large entities, such as a zombie riding a sniffer, can still attack players who are completely above the vehicle and out-of-range of the passenger.
How to reproduce
- Summon a zombie and a sniffer, then execute /ride @e[type=zombie,limit=1] mount @e[type=sniffer,limit=1]
- Build up 3 blocks from the sniffer's position
- Check the range the zombie can attack you from
Added Attachments:
Added Affects Versions: 23w35a
You're reporting two issues here, only focus on one issue per report.
The issue you mentioned about mob reach in boats is something i commented on about in MC-264927, maybe that report should cover for all the cases, however their description isn't quite right so it hasn't been confirmed yet.

In your video the player doesn't seem to be completely above the horizontal mob range though, so the rider wasn't exactly out-of-range but with an increased reach because the sniffer has a wider hitbox, and this can be reproduced with monsters riding interaction entities with large width.
One could argue this might or not be used as a feature for mobs with custom horizontal range, but could be considered a bug, so i can only confirm this case.
I confirmed with boats
This is intended as per https://www.minecraft.net/en-us/article/minecraft-snapshot-23w33a
The mount of a mob now extends its horisontal reach to match mounts hitbox.
Just saying, this specifically is not mentioned in that changelog, only that you're protected from shorter mobs while riding, and that reach is now bounding box + horizontal range. It doesn't mention the rider's range is affected by the vehicle.
Also, wrong resolution.