You make some great points here.
I would say in an API-only context, we're seeing a lot of benefits in using RoR for the back-end and pairing it with Tanstack for the front-end.
Realistically, when/if it matters, we'll just port to a quicker language, which is now effortless.
But when you're in build mode, Rails is wonderfully ergonomic (for humans + AI).