Check the value of the 'NE' system parameter using PRINT PRM('NE'). If that parameter is zero (off), any errors in the sub-program should be returned to the parent program. But if the parameter is on (non-zero), then the error will be reported in the sub-program, and your ERR= branch won't be honored.
https://manual.pvxplus.com/PXPLUS/parameters/ne.htm
https://manual.pvxplus.com/PXPLUS/parameters/ne.htm