Y axis going the wrong way

Hi, I fitted some limit switches to my atomstack laser. I input the code $22=3 and the laser went to the home position just fine. However after restarting lightburn and inputting the same code. The laser head keeps going in the wrong direction. I have tried restarting and inputting $22=2 all the way to 9 with no change.
What can I do?

$22 is for enable/disable homing cycle what are you trying?
https://github-wiki-see.page/m/gnea/grbl/wiki/Grbl-v1.1-Configuration

I am trying to get the laser to home.

You may also need to select a homing direction, see below.

Set $22=1 to enable homing.