Yeah, when dash cam lenses go in and out of focus due to contraction from overheating and cooling it is always a problem with the lens holder and not the lens itself.
Many, if not most dash cam lenses these days use FRP (fiber reinforced plastic) lens holders (barrels). FRP is usually highly dimensionally stable, but apparently not all of them are. Metal lens holders are the preferred way to go but we don't see them as much anymore. Metal lens holders are cast and then machined which makes them more expensive whereas FRP holders are popped out of a mold.