you are correct. Men and women who work on US flag merchant ships are subject to random drug testing. If they smoke pot in a state where it is legal and test positive they can lose their merchant marine documents and licenses.
Similar subject came up at a meeting at work - we live close to the NJ border where it’s legal. We were advised to not be the “test case”. While that might get you a lot of fan mail, it would not look good on the resume when you have to look for a new job.