A state has passed new cannabis rules meaning drivers will no longer automatically lose their license if they fail a mobile drug test.