Indeed this was a challenge we also faced for our Machine Learning / Computer Vision courses at Universität des Saarlandes (Saarland University) in the last year.
Starting this year, we also aim to have in-person vivas and mini-tests during the course of the semester to actually have students explain their thoughts and working process of the materials and assignments.
Talked to a Stanford prof last night who told me that AI has led to students all acing all the homeworks, never showing up to office hours, and then failing the final exams in-person.
So in response the department is changing the TA's purpose, by eliminating office hours and requiring students meet with TAs 1:1 and walking them through each coding assignment to demonstrate they actually understand what's going on in the code.