As another former astrophysicist-turned-datascientist (though with only 2 years after the transition instead of Marcel's 7), this hits close to home, but my experience in both worlds I think is a bit different.

If you are an astrophysicist curious about moving into the datascience profession, I would just like to point out that satisfaction with a move like that depends on a large number of factors, and that you should consider not only Marcel's experiences (which I think are important and shared by many) but your own personal circumstances. There are pro's and con's for every person.

Let me offer another datapoint:

* I left after my PhD, which ended absolutely terribly. I knew years before finishing that I was just not cut out for a life in academia, and positioned myself in the best way I knew how for a life in industry, but I did not anticipate just how truly painful the experience would be. I stayed to finish my PhD out of a nagging obligation to follow through with a lifelong dream of mine. I thought I would deeply regret leaving after receiving my masters degree. Whether or not that is true, I really don't (and will never) know. But I was not happy.

* My personal reasons for unhappiness are not uncommon but are definitely not universal. I did not excel at the entrepreneurial and social aspects of astrophysics that are crucial for success. Without strong social and professional ties to close collaborators within the community, and without an innate ability to thrive in an environment with very little structure, add to that a predisposition for mental health problems, I burnt out quickly. I found myself withdrawing from social settings as burnout set in, and the hill was steeply downward from there. When I don't socialize, my ideas stagnate, my work suffers, and my perspective warps until it's easy to submit to delusions like "I am doing great" when really I was (obviously, in retrospect) not doing great at all.

* The transition to datascience was on one hand fantastic. I have a structure that (1) forces me to socialize daily, (2) forces me to confront my productivity levels frequently. Even when completely remote these past 9-10 months, I find my productivity is far more consistent than it was in graduate school, and my life is far more sane. I have a true work-life balance that I could only fantasize about before.

* The stress is much lower (in my current role). My work no longer defines who I am as a person. Doing what you love sounds great on paper but really what it means are higher highs and lower lows with each small success and failure. While in the beginning of my graduate school experience, I was reasonably well-rounded and rational, as I dived deeper into my own thesis work, I started noticing that I became far less receptive to criticism. My thesis work was so integral to my identity that it became harder and harder to be objective about it.

* Financially I am far more secure, and that is incredibly important to me. I'm not earning anywhere near as much as a $500k AI/ML researcher at FAANG, but I'm also not earning a $30k grad student salary or a $50-60k postdoc salary. I can live extremely comfortably while still building a savings (and am no longer in credit card debt). I also can find a job in the location I want. I don't need to write 20 detailed applications (all during "application season") for roles around the world, wait months to hear replies, and then pack my bags to go wherever I'm accepted. That's a hell of a perk.

* Like Marcel, however, I do find myself missing many aspects of the world of astrophysics. I miss a community completely made up of people at the top of their professional game, making groundbreaking contributions on existentially important things, where everyone seems to share the same "datascience" mindset. I miss symposiums and lunch talks and people with deep passion for what they do. However I have found it incredibly satisfying to work alongside people with other strengths; programmers, product, designers, and managers. These people may or may not have a deep passion for what they do (for some its a job, for others its a passion), but they all have incredibly valuable expertise to share and perspectives to offer. So in that sense, it's not clear to me which world is better.

* As time wears on, I'm finding myself losing some of the knowledge I once had, and that's a bummer. Datascience allows me to keep the statistics channels of my brain somewhat active, but I'm no longer doing things like graphical models and MCMC. I'm trying (slowly) to build a blog where I can do these things as a hobby, but it's difficult to motivate a lot of times; I find that a lot of times it takes me back to the stressful mindset of grad school. I still have three unpublished papers from my graduate school days but the longer time goes, the less of a chance I think these will ever get published, but they stay in their current state because the last time they were touched I was almost losing my mind from stress and I just avoid teleporting myself back to that terrible time.

I apologize for the rant but my point is: your mileage may vary; Marcel makes some very good points but consider all the pros and cons for yourself. As someone else commented, a sufficiently motivated data scientist can definitely get back in the academic game (though it will be more challenging).