The way I see it is that a lighter bike will be quicker up hill. You spend more time riding up hill than you do down them again so you’ll spend more time riding quicker than a heavier bike.
A faster bike will move you up the results and you’ll just have your fun racing there than racing further down them.
Least year I had a last minute mechanical with my Cannondale Scalpel that I normally race on. I raced on my Steel 45650B hardtail instead with 2.35 Hans Damph and a reverb. It was much heavier than my Scalpel. I had just as much fun racing against people but I was about 10 places down where I expect I would have been on the Scalpel. Subsequent races on the Scalpel saw me finish around 10 places higher than where I finished on the 45650B.