I have a workflow in a Sharepoint 2019 Document library.
The workflow renames the file without a problem with the operation "Set field value".
The issue is that the change only occurs at the end of the workflow. This means that if I want to copy the file to a different folder, or use the item URL in a notification email, the old name is still used.
I tried using the "Commit pending changes" and/or "Waiting for update" and using as a condition that the name of the item matches the new name, but it doesn't work. If I just use the "Commit pending changes", the old name is still used. If I also include the "Waiting for update", the workflow gets stuck and never completes.