How does Google Drive locally cache files before uploading them? How safe is it when offline?
Solution 1:
As it was mentioned on a couple of comments to the question, saving a file to a Google Drive folder while being offline is risky because Time Machine doesn't backup the Google Drive for Desktop cache by default. The safest way to proceed while working offline is to save the file to a local folder then when going online again move the file to the Google Drive folder.
NOTE: At this time I don't know how to make Time Machine to backup the Google Drive for Desktop cache.
Google Drive for Desktop stores the files as long as it's necessary while it's installed on your computer, just don't keep your computer without Internet connection for a very long time (several months) as Google is continuously updating it and if the installed version becomes too old it might not be able to communicate to the Google servers.
NOTE: I'm returning to Mac after several years so I'm not sure about the specifics about your operative system version, but according to System requirements and browsers it's the oldest Mac version supported, so there is a risk that in the upcoming months it might become unsupported.
According to a couple of answers to Can you back-up your Google Drive folder (on my Mac) with Time Machine the cached files aren't backed up by Time Machine by default.
You can learn about some technical stuff about Google Drive for Desktop on the help article pointed to Google Workspace administrators: Configure Google Drive for desktop