If you’re using the Google Authenticator app, try going to Settings -> Time correction for codes and pressing the “Sync now” option. Codes should be being generated with UTC, and unaffected by DST.
It’s possible your phone has an outdated tzdata, so can’t apply the correct timezone offset.