All my peers who started their careers with Rails that know it like the back of their hands have zero desire to ever work with it again professionally. They're all exceptional engineers who had no problems picking up/migrating to Scala/Rust without productivity loss.
On the other side, I see all the upcoming engineers that missed the initial Rails popularity wave. To them, Rails is often times much more frustrating than TS/Python offerings. There's very little freely available quality onboarding materials, getting the environment set up is incredibly frustrating with how fickle bundler has become, and deployments are still complicated.
My take is Rails is good for those who already know Rails, since the stability of it lets seasoned Rails developers carry forward all their experience. But for someone without that history, TS/Python frameworks offer a much faster/smoother onboarding process, especially with the massive familiarity advantage devs already have with Python/JS from schooling/web.
If you're going to go out of the way to learn a new language, why would you learn one that occupies the same space as one you already know?
If the above is correct, it presents an interesting question to junior engineers: is it worth it to learn Ruby on Rails as a junior engineer? While there are advantages to learning Rails (it's heavily opinionated, what you learn maps very well to what professional projects look like), there is more job supply in the "python + LeetCode" path (how that relates to competition - who knows).
Contracted Rails devs are probably working on an enterprise product that is already mature and making money.