That is going to be tricky -- the screws are running into the narrow side of the foam board, if I am viewing the photo correctly. So there is not a lot of "meat" for the screws to grip. And you can't use screws that are much fatter -- they will split the foam board.
Is it possible to remove the heater completely? (A big hassle, I am sure.) And then fill the screw holes with something like epoxy, so that the screws will have something to bite into.
You will want to drill pilot holes, of course. Which will be hard because the opening of the water heater is not wide enough to accommodate both the drill motor and the drill bit. So you might need a right angle drill attachment.
I would recommend long stainless steel decking screws -- they will probably reach undamaged foam in order to grip better.
Good luck!
2012 Fun Finder X-139 "Boondock Style" (axle-flipped and extra insulation)
2013 Toyota Tacoma Off-Road (semi-beefy tires and components)
Our trips -- pix and textAbout our trailer"A journey of a thousand miles begins with a single list."