There is often dispensation for garages relative to side-setbacks compared to residential accessory buildings and other structures and that likely stems from the very real fact that driveways, themselves, are often close to the line. Our jurisdiction requires 15' side-setbacks for all structures except garages. Garages require a minimum 5' side-setback. And yes, like-for-like, including setbacks is often approved for same footprint replacements with some restrictions and requirements. But again, zoning is "local".