Currently in use by another Gradle instance

Recently started to get the following errors with gradle:

Timeout waiting to lock jars (~/.gradle/caches/jars-9). It is currently in use by another Gradle instance.
Owner PID: 57804
Our PID: 57808
Owner Operation:
Our operation:
Lock file: ~/.gradle/caches/jars-9/jars-9.lock

Failed to ping owner of lock for file hash cache (~/.gradle/caches/7.5.1/fileHashes) (lock id: 6709952602581372955, port: 55012)

Error resolving plugin [id: ‘io.spring.dependency-management’, version: ‘1.0.8.RELEASE’]
Could not resolve all dependencies for configuration ‘detachedConfiguration1’.
Failed to ping owner of lock for artifact cache (~/.gradle/caches/modules-2) (lock id: -610401808950829953, port: 63818)

Mostly with Android projects, but also with backend java (gradle project as well)
I had recently installed a new proxy service on my machine and was wondering if might affect gradle processes? As my coworkers, who don’t have that proxy thing installed, don’t have such issues
Unfortunately this is happening quite often and I have to remove the locks manually in order to re-run gradle task
Any suggestions how to debug this?

java I use for android:

openjdk version “11.0.16” 2022-07-19 LTS
OpenJDK Runtime Environment Zulu11.58+15-CA (build 11.0.16+8-LTS)
OpenJDK 64-Bit Server VM Zulu11.58+15-CA (build 11.0.16+8-LTS, mixed mode)