IIRC, the pivotal case involved individuals arrested for possession of illegal firearms while staying in a hotel. The firearms were being moved between States and were legal in both the origin and destination States but not in one of the States they were transporting them through.
The court viewed this as unconstitutional interference in the commerce between the origin and destination States, which seems correct on its face. There must be evidence of intent to distribute the firearms in the State where they are illegal. This case created a safe harbor for mere transport of goods between States.
Cannabis is different because it violates Federal law. It is technically illegal everywhere even though it is legal under State law in many locales. The Federal government has chosen to not enforce this law in States where it is legal, largely because enforcement could create a Constitutional case that could bring into question Federal authority to enact those and many other laws.