Any “shadow” style 9 speed MTB derailleur should work, but I don’t think any of these are made by Shimano anymore for 9 speeds, except for the new CUES stuff which will require replacing more parts. You could swap shifter and derailleur for Microshift Advent and keep the cassette. Or possibly the Sunrace M9 derailleur could be a direct replacement.
But I wouldn’t assume the derailleur needs replacing just because of its age - there are plenty of other factors that could be affecting your shifting.