I wouldn't do it. I like suspension on a mountain bike when I am mountain biking. I have ridden full rigid bikes and it is less fun I still had a good time but I was a kid at the time, as an adult I have learned suspension is nice and weight savings is cool but suspension is better I could save weight elsewhere like go 1x ditch the front derailleur, second chainring, front shifter, the cable and housing associated with it.
If I wanted to save weight on suspension these are some light options:
https://www.ridefox.com/family.php?m=bike&family=32
https://www.sram.com/en/rockshox/models/fs-sids-ult-c1
https://www.intend-bc.com/products/samurai-cc/
Make sure you measure axle to crown as
rosefarts said changing your geo could be not so good.