高校生はタバコを吸ってはいけません basically means "high school students must not smoke" which is different from "cannot smoke." Shouldn't smoke is not exactly the same command tone that is conveyed in the Japanese sentence, but it is more correct than "cannot smoke"

Agreed. However, using "must" is counted wrong by Duo.
In English the word "can" (or "cannot") denotes the ability to do so. The word "may" (or "may not") denotes legality or permission. True that we have to guess at the context here, but I assure you that, unfortunately, many high school students can smoke (tobacco or otherwise). Technically, however, they may not smoke.

It used to be very common in Germany. In the middle school grades (up to 10th grade) it wasn't accepted due to child protection laws, but in high school (11th to 13th grade) it wasn't a big deal and students sometimes smoked with teachers.

Correct answer they showed me: "High school students are not allowed to smoke cigarettes". I omitted "cigarettes"
So in the answer above "smoke" is ok, but in the version I attempted you have to specify cigarettes.
I know this is automatic marking and free, so you can't expect everything, but it is still frustrating

I'm confused as to why DL refers to てはいけません as "cannot" when it just doesn't seem intense enough. "Must not" is a better translation. Using the informal negation + で sounds more like "you cannot do this" or "don't do this."

A better form of High school students cannot smoke (to me anyway) is:
高校生はタバコをすわないで。