I’ve tried your example and found this hint in my console output:
2023-10-24 18:22:29.394 WARN 22224 --- [nio-8080-exec-5] org.camunda.bpm.engine.cmd : ENGINE-13047 Deployment name set to null. Filtering duplicates will not work properly.
Adding the deployment-name
to the request returns an existing deployment ID on deploying an unchanged BPMN file.
Hope this helps, Ingo