Solution found. The reason why jobs were not recovered automatically is the too long lock timeout in job executor settings:
<process-engine-context>
<job-executor threads="4" idle="1000" idle-max="120000" lock="3600000"/>
</process-engine-context>
I changed the lock to 10000 (10 seconds) and now it's recovering normally.