Having had CX-5's since 2013 (still have them), and my CX-50 since 2022, let me comment...
The CX-5 has more sound deadening and is quieter, so it, IMO, makes the ride
feel better than the CX-50, simply because the road imperfections are not heard as much. In actuality the ride is not that much different between them. I tested this by wearing earplugs and driving the two cars over the same bumpy roads. I couldn't really tell the difference in the ride between them when I couldn't hear the tire-thump noises. Further to that, I added sound deadener to the 4 doors of my CX-50 and the ride subjectively improved.
However, the handling of the CX-50 is much better in general than the CX-5... flatter cornering, more road feel. All the crap that is talked about the rear suspension is just that. It's NOT a regular torsion beam on the CX-50 but acts more like an extra-stiff sway bar tying the wheels together. So yes, if the rear wheels go over different bumps, it will be a tad more harsh, BUT, it doesn't negatively affect the actual handling.
My 2c.