No side or rear setback outside fire zones
An ADU 16 ft tall or less can go up to the side and rear lot lines unless the lot is in a High or Very High Fire Hazard Severity Zone, where it keeps 4 ft. A taller ADU next to a residential lot keeps 4 ft (or the zone's smaller setback), and building and fire codes can still require more distance from a lot line.
San Diego Municipal Code 141.0302(b)(9)(C) and (D)