When Spike is shown in back of the dog catchers truck the second time, you can see a new lock keeping him from escaping again, but when the truck turns right and drives out of sight the lock has disappeared.
Stray dogs usually do not wear collars so Spike the dog should not have been picked up by the dog catcher since he is wearing a collar.
Spike the dog, while locked in the dog catchers truck, could easily reach the latch and let himself out without Jerry's help.