I’ve owned both. I started off with the assumption that my 19lb hardtail would be much better climber than a 27lb FS, but I was wrong – on my local trails.
Ten years later I now own a fully rigid bike which has also been HT, and a short travel FS both 29er. The FS is *much* better on rocky trails.
Where the rigid bike wins out is when it’s smooth, but only if I modify my style to get the benefit. Because it’s so stiff and stable it allows me to move about on the bike far more, which allows me to bring in my core and arms, which might help leverage and power but the moving around really helps keep my body loose and comfortable. So my FS is what I reach for when I want to be fast, and my rigid bike when I want to be out for a long time.
But if I stay seated on smooth trails I reckon there wouldn’t be much in it.