John Mueller of Google said not all Googlebots use the same rendering engine, in fact, not all Googlebots need to do rendering John added. So while the main desktop and mobile Google search crawlers, the main Googlebots, do rendering and render JavaScript pretty well, not all the Googlebots do or need to.
John said this on Mastodon when he was asked, "Does that mean all the crawlers behind these user agent strings always use the same render engine for .js content?"
John replied, "definitely not all crawlers, or even the ones documented - for example site verification wouldn't need to do rendering. We don't separate that out in the docs. The desktop/mobile ones for search would though, since they need to see the pages as they are loaded in browsers."
So just because it is a Googlebot, it does not mean it renders your pages fully, partially or at all.
Forum discussion at Mastodon.