To stop your 2 year old from taking his diaper off in bed or at any other time you can use some clear packing tape to wrap completely around his diaper.
The packing tape will make it more difficult for him to remove his diaper since the tabs on the diaper are Velcro and are easily pulled off.
But the addition of the packing tape will make it harder for him to remove the diaper.
When I use packing tape on my 2 year olds diaper I have to use scissors to cut the packing tape off of his diaper so he and even myself have a hard time remove the tape.
My 2 year old would take his diaper off too during the night and yes like yours he would take the diaper off in the day without me noticing and then pee his pants.
He still is not ready to potty train either so I had to resort to using packing tape.
I tried putting a belt on his pants and for awhile it worked but he still managed to eventually figure out how to remove the belt and then removed his diaper again.
He would make sure I wasn't looking and then open his pants and then undo the tabs on the diaper and then pull the diaper out of his pants and throw it behind something such as the couch, chair etc.
He could then button his pants back up but sometimes he would leave the zipper undone because not all the time could he manage the zipper.
So I had to resort to using packing tape around his diaper and so far he has kept the diaper on and no more wet pants.
Sometime a kid is ready to potty train when they remove diapers but it's not always a sure sign they are ready.
I tried toilet training my 2 year old when he too his diaper off but it didn't work so I just kept him in diapers and he probably will be wearing diapers until at least 4 years old like his older brother did.
Eventually they will stop trying to remove the diaper.