It can occur during a lot of situation:
- enabled in FPM but not in CLI (so
wp-cli fails): I guess it's shouldn't even load if PHP_SAPI === 'cli'
- during a PHP socket switch / version upgrade
- during a debugging attempt that imply deactivating so PHP modules
- ...
In all these and others cases, the extensions should definitely NOT trigger a fatal error.