Being able to lock in gives you upstroke and downstoke, and your feet will never slip, but it comes with the safety risk of being locked in.
It may be harder to recover your balance, and especially on the mountain, the ability to unclip and put your foot down for counterbalancing around bends, rough passes, etc. will take an incredible amount of finesse to master. If you bail out and remain clipped in, that's also a huge safety risk potentially. But depending on the nature of the bail, you could be doomed if you do or doomed if you don't anyways.
I don't have much mountain biking experience, I come from a gravel background, but I've noticed a few things after switching to clipless pedals and shoes.
My pedaling efficiency went through the roof after a few rides. I smashed all my PRs on Strava without even trying because my pedal stroke was a lot more efficient.
But my confidence suffered at first while I was still getting used to being clipped in. I wasn't willing to take the same risks as before because I wasn't sure I'd be able to unclip fast enough if I need to bail.
Of course, there were a few times that I couldn't actually unclip fast enough, and I took a plunge, luckily without any major consequences. Just a scraped knee and a bruised pride.
Once you get used to being clipped in, you'll ask yourself how you ever rode with flat pedals before.
Now, I know this is slightly different in mountain biking and that mountain bikers choose flat or clipless pedals depending on a lot of different factors, but these are my two cents when it comes to slightly milder off-roading on gravel.