I am not sure about your situation.
My experience is that I got an offer from outside, my supervisor did not want to lose me, so he gave me a big raise to match the salary the other company offered me.
I did leave for some other reason, not the money. At new company, right after they hired me, my boss left for other position out of this company, so they hired a new boss who doesn't know anything about my job, and loves to play power game which I am not good at.
I miss my previous boss. We are still friends. If I knew what would happen, I prefer to stay. I am sure if I stay, he would not fire me later.