If it was me, I'd just 3d print a little cover, or even just a ring around it so you have to really try to hit the button. Without a 3d printer, you could probably make something with some cardboard, the button doesn't stick out much. Either way you would have to glue it to the headset veeeeery carefully.
Alternately, a tiny webcam cover could work:
Yup - super easy to do:
You might also want to check out three.js if you only want to get up and running on Google Cardboard.
If you're only interested in the Rift and don't feel like going onto the web, this would be a super simple project to set up in Unity, also.
If you choose Unity, I can recommend Jonathan Linowes book.
https://www.amazon.com/dp/B089B6B2PX
But that uses the XR interaction toolkit rather than Oculus Integration. Works fine for me though and everything is well explained.