Whether other types of files occur this issue? Whether all document libraries occur this issue?
Can users edit files when they open them in the browser?
Whether Office is not activated? And user office subscriptions are expired?
Please check following tips to troubleshoot this issue.
1.Go to Site Settings -> Site Collection Features > Deactivate "Limited-access user permission lockdown mode".
2.Go to SharePoint library settings, clicking on versioning settings and under "Require check-out" check and select No. And when Draft Item Security is set to Any user who can read items.
3.Try to sign out from Office applications -> Enter Credential Manager in Windows Search and click on it -> Windows Credentials -> Remove all the Office Credentials -> Restart your PC -> Open Office application and sign in with account -> Open the file in desktop application from SharePoint online document library to check the behavior.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.