Depends on why it is pitted, if it’s from cell rot, you may not find steel that will hold an edge, unless you remove some steel.
I have one razor with some pitting near and on the bevel but is well clear of the edge, it’s not from cell rot. It has been like that for years and as long as it does not touch the edge, is fine.

In my rotation it will probably never see another full bevel re-set and so little steel will be removed from the edge, that it does not matter.

So, as long as you can get a good, straight edge is all that matters really, but if it bothers you, remove enough steel to get a solid bevel and edge.