As pp said, sounds like you need gradual withdrawal.
With the patting, pat for a few mins upon lying down then still your hand but keep it on him. Any time he starts to notice the lack of patting then pay again for a few mins until calm and still your hand again.
The key to GW is trust. He has to trust that you will always be there for him as much as he needs. But while that will be the case, you will always be constantly pushing for the next bit of independence.
So must trust that the instant he needs a pat, you will pat. But you keep on trying to still the hand until he trusts that a still hand is ok because if a pat is needed it will not be denied him.
Once a still hand is accepted you move to removing your hand. Keep same 'leaning over the cot' position as if your hand was there. Use the hand on chest/back to sooth whoever needed then remove your hand after a few mins. Hand back at any distress or request for a few mins then remove hand.
Again trust needed that the reassurance will be instant when needed, but that the slow withdrawal is consistent.
After a few days/weeks once this is accepted, start standing up with the hand removal. Then start putting him down, firm hand on chest for just 30secs if do then stand and wait until asleep.
When this is accepted start turning body away from cot. Then a step away, and so on.
If you take this gently and slowly there should be no upset or distress caused, but it is not a quick fix. It may take several months of slow, tiny changes.
Good luck!