Should all work OK together.
Is it overshifting, undershifting, or some other problem?
If you take the chain off and eyeball the alignment of the derailleur cage with the sprockets, can you detect any discrepancy between the jumps the cassette requires and the jumps your derailleur gives?