Bookmarks, in themselves, are only the URL, not the resolved IP address. E.G., for this query, https://superuser.com/questions/1864136/when-firefox-will-not-ask-the-local-dns-client-to-make-dns-query is the bookmark.
So the question is, under what conditions does Firefox open a site from the web, rather than using the cache?
Clearly, if a tab was recently opened, and then returned to after viewing another tab, the cached page is reused.
There is a setting for checking cached pages, set in about:config value browser.cache.check_doc_frequency.
"This preference controls how often to check for a newer version of a cached page.
0 - Check for a new version of a page once per session.
1 - Check for a new version every time a page is loaded.
2 - Never check for a new version - always load the page from cache.
3 - Check for a new version when the page is out of date. (Default)"
There is a DNS cache timeout, which defaults to 60 seconds, plus a 60 second grace period, in Firefox 133.0. Older versions might have had a default of 300 seconds. Those settings are in about:config values network.dnsCacheExpiration and network.dnsCacheExpirationGracePeriod.
So this is not a definitive answer, and there are yet other timeouts that might interact with refreshing the DNS cache. One thing you might try is to temporarily disable DNS resolution (e.g., putting in 127.0.0.1 for DNS server) and see what happens when changing tabs, or after a wait.
You could also run a tool such as Sniffnet or Wireshark to see when Firefox makes a request to the DNS server.