My key fob does not work sometimes on my car. This usually occurs in the evening or early morning when my car is parked either in my garage or upper half of my driveway. I have never had this happen away from my house, so I know the batteries in the fob are fine. I also have 3 different fobs, all programmed by the dealership 5 years ago. All three fobs do the same thing, working or not. During daylight hours, the fobs work 99% of the time.
Do you have LED bulbs installed in lights in your garage or the outside of the garage?
LED replacement bulbs can be very “messy” with respect to radio frequency interference and may be interfering with your remote. Or maybe your neighbor is operating a pirate radio station.