Keycloak container loses permissions

In my project we have a keycloak container running where we have mapped as volume a folder for .jar deployments. It happens that sometimes this folder has the permissions changed inside the container.
And this error happens

�[0m�[33m15:04:11,074 WARN  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0039: /opt/jboss/keycloak/standalone/deployments is not writable
�[0m�[33m15:04:11,075 WARN  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0043: Deployment directory scan failed due to inaccessible deployment directory: /opt/jboss/keycloak/standalone/deployments

Initially the folder has the permissions for user jboss and group 1000 (as we set)
And sometimes, without we knowing why, when this error happens, inside the container the folder has the permissions set for user and group 1001.

we dont even know who the 1001 user is.
Can someone help?