Jenkins and JFrog Artifactory - artifacts are not deleted after "maxBuilds"

I am successfully uploading my artifacts using the JFrong plugin. I think I have set up everything for automatic deletion once the number of builds (artifacts) is more than 5. However my artifacts are not deleted (I have them more than maxBuilds property) although the user which I am using for upload has permission to delete artifact (I’ve tried and it works manually). Did I configure everything properly? Thanks

   stage ('Artifactory stage') {
            steps {
                rtServer (
                    id: 'Artifactory',
                    url: 'https://artifactory.domain/artifactory',
                    credentialsId: 'test',
                    timeout: 300
                )
            }
        }

        stage ('Build info stage ') {
            steps {
                rtBuildInfo (
                    maxBuilds: 5,
                    deleteBuildArtifacts: true
                )
            }
        }

        stage ('Upload stage') {
            steps {
                rtUpload (
                    serverId: 'Artifactory',
                    spec: '''{
                          "files": [
                            {
                              "pattern": "arena-*.zip",
                              "target": "project/packages/"
                            }
                         ]
                    }''',
                )
            }
        }

        stage ('Publish build info') {
            steps {
                rtPublishBuildInfo (
                    serverId: 'Artifactory'
                )
            }
        }

Starting with Artifactory version 7.68.6, there has been a change in the behavior of the build deletion process. Specifically, build artifacts may no longer be deleted automatically when the deleteBuildArtifacts parameter is set to true. This is due to an updated requirement where the deletion process now also depends on the build.timestamp parameter, in addition to build.name and build.number. https://jfrog.com/help/r/jfrog-rest-apis/control-build-retention?tocId=fQqrl6FPSrISc9Pas8oKCw

Workaround

To restore the legacy behavior—where only the build name and number are used to locate and delete associated artifacts—you can apply the following configuration change:

  1. Open the file located at:

$JFROG_HOME/artifactory/var/etc/artifactory/artifactory.system.properties

  1. Add the following property:

artifactory.build.forced.delete.artifacts=false

  1. Restart Artifactory for the change to take effect.

This configuration forces Artifactory to bypass the build.timestamp requirement and revert to the previous artifact deletion logic.