In my opinion, I don’t think that would fail, the top tube is under compression, and I’m sure with all that ali there its more then strong enough. Also, the suspension load doesnt go through the top tube like some frames. It is definitely more then just a dent though, I can see a crack/sharp crease. I wouldn’t buy it on the basis that it would annoy me looking at it every time I rode it.
Full sus frames do not suffer as much as hard tails as sudden impacts from riding are absorbed by the suspension.
I would be worried about the condition of the linkages and the bearings, just a small misalignment will cause you problems.