A minimal partition problem with trace constraint in the Grushin plane