The autopilot in NAV mode is independent of OBS or CDI inputs (on an ILS). It only looks at the error signal, which won't change when changing the OBS. It responds to HDG course input, measuring the error between dialed-in course and current heading.