Getting "Unknown property used in expression" error intermittently


We are intermittently getting the error “Unknown property used in expression ${MyClass.MyMethod(myarg1,myarg2)}Cause: Cannot resolve identifier MyClass.”
We have configured this method as a system task implementation in the form of an expresion.
The invocation of this method works perfectly at certain times but throws the above error sometimes.
Any possible reason for this behaviour?
We are using the following versions of process engine and the application server:

Camunda process engine: V7.12.0
Application Server: JBoss EAP Standalone 7.2.5

Just to add another point: We’ve marked the above system task in Question as “Asynchronous Before”, to indicate that it is an independent asynchronous piece of work and to be the recovery point whenever the process fails at this step.