Commitment is a very personal battle and everyone handles it differently. It's unlikely that all of these will work for you, but it's likely that a few might:
Listen to music that gets you hyped up
As soon as you hit the ground, jump back up onto the pedals to try to feel what a successful landing would've felt like
When you get a close attempt, harness the adrenaline and go for another attempt right away
Literally tell yourself on repeat that you can do it/you WILL land it etc.
Land an easier trick that you're good at to feel what it's like to land a trick, and imagine that same feeling while attempting the actual trick right after
Give yourself a time or attempt limit when you are getting close to the end of your session (5 more minutes, 5 more attempts)
Have somebody else enforce this for more pressure to commit. If you are literally getting kicked out of a space, it does wonders for commitment.
Have somebody around your level also trying the trick. Make it a little (friendly) competition. Take turns trying and even if they land it first use that as motivation to catch up quickly
Don't overthink what you're doing, or you'll try something weird and forget to do stuff that's in your muscle memory (keep in mind though that sometimes analyzing and trying different things works, but only when you're still trying to figure out technique, and it's more than just a commitment issue)