chromium/third_party/blink/web_tests/http/tests/inspector-protocol/bfcache/resources/blocking-feature.js

async function preventBFCache() {
    await new Promise(resolve => {
      // Use a random UUID as the (highly likely) unique lock name.
      navigator.locks.request(Math.random(), async () => {
        resolve();
        // Wait forever.
        await new Promise(r => { });
      });
    });
  }

await preventBFCache();