This is a PWA. Install it on your device. (On iOS/iPadOS, Share, add to Home Screen. Everything else, click on the install icon at the top of the screen.)
Run the App from the Desktop/Home Screen
Exit the app. (on iOS/iPadOS, it is a multi-finger pinch in and then swipe off the screen).
Go into aeroplane mode.
Start the "WORKS" version and it should run offline.
Start the "DOES NOT WORK" version and on iPadOS only, Safari will show a message that it is offline.
The difference between the 2 apps is a section of code in the serviceworker that does not run as it is ring-fenced by a 'if (false) { }'