That's been a common problem for years on Winnebagos. I had my rear latches on a '07 Meridian years ago where I finally drilled some holes and attached it with screws ...and used various adhesives on the front compartment hinges. But it seems like the common solution in the dozens of threads on this is to use a strong marine adhesive like
3M 5200.
Here's one thread, for example, on the Winnie Owner's Forum but we have quite a few on this forum too if you do a search:
Hood latch - old problem - new to me