We would need to lower down the time of the session of the user editing the document via Office Online Server. (SharePoint 2019)
User 1 opens document SampleDocument.docx, User 2 opens the same document.
User 1 closes document, User 2 sees User 1 as he is editing the document for another 5 minutes.
Because of this, we cannot edit the properties of the file on the SharePoint, because it still thinks that it is opened by someone. This happens even if you are trying to do it you alone, means the SharePoint/OOS still thinks you have the document opened till the session times out.
I have tried to edit few settings specifically on OOS via PowerShell, but all available functions seem to adjust some Excel request timeouts and stuff, but not the session of the document editing.