Understand Apex Behavior While Offline
The standard Salesforce web interface requires a continuous network connection to the Salesforce service. When a standard Salesforce client, such as a desktop browser, is offline, features that require a connection to the Salesforce service—which is most features—don’t work. Since Apex runs on the Salesforce service, this includes all Apex-based features of Lightning web components.
An offline-enabled mobile app, in contrast, is designed to continue to function even when no connection to the Salesforce service is available. The offline features of the app aren’t magic; data that’s not already available on the client device is inaccessible. But carefully designed features, including Lightning web components that use Apex, can continue to run with data that’s available locally, on the device, even without a network connection.