The true meaning of code-switching???

Hey! I’m currently studying linguistics in Australian high school (VCE English Language). My exam is coming up in a month but there has been an ongoing debate within my class all year. Originally, we were taught that code-switching is when somebody switches from speaking one language to another, however my teacher and peers have seen it being used differently online. My teacher constantly makes reference to American news reports claiming that Kamala Harris “code-switches” to an AAVE accent while speaking in certain states to build rapport with the audience and be more relatable even though that’s not the accent she grew up having. So basically, can somebody settle this once and for all? Do you guys believe that there should be separate terms for language switching and accent switching?