With this pandemic I do not think online classes or taking physics in the summer at a different school is an issue.
However, I do want to clear up the myth that if transcript does not say online, then a student's secret is safe. Schools do not simply use a transcript to verify course requirements, including prohibitions for online, have been met and they do so after acceptance but prior to matriculation.
1) Schools only see the courses you enter on AMCAS when they are considering your application for admission. AMCAS does not verify online or do they do anything to check for prerequisites which is a school specific function.
2) Official transcripts are required be sent directly to the school when you are accepted but are not the only way that courses are checked during post-admission/pre-matriculation phase.
3) During a school's "due diligence" of an acceptee they will frequently use the National Student Clearing House (NSCH), which has agreement with AAMC/AMCAS a few years ago. This organization has the largest and most update database on official college course catalogs and other registration material now dating back about 25 years, a large fraction of which note course section number that may indicate if a class was online or not
4) Additionally, schools may contact UG registrar for it's pre-matriculants to check on courses including if any sections were online or not.
5) Schools also get "audited" for re-accreditation for LCME and they have spot checked students from admission to current (as sample the school is adhering to its accreditation standards. This has on rare occasions come up with issues on now matriculated students
6) why is this all important? Between attesting/signing/agreeing to AMCAS application, secondary application, acceptance agreements, and matriculation agreements, applicants/acceptees/matriculants have agreed to follow schools policies/student handbook/published requirements. If you are found anytime after acceptance, up through your earning a degree, to have not be accurate in this information, you could open yourself to an ethical violation. This could have your acceptance rescinded even if you are an MS3/MS4. While these actions at that point are exceedingly rare, it isnt the probability of the risk but the impact of the risk . You could have your acceptance rescinded, be removed from school, and you would have no legal recourse as a full Federal Appeals court has ruled.
In short, it isnt worth the risk. Check the MSAR which lists in its prerequisite grid if a school accepts online coursework