You didn't really give enough detail, so it is hard to be sure what is going
The stain affected the wood differently where you than where you didn't
sand; it got blotchy where you sanded and didn't elsewhere. Is that correct?
Is this new material or old pieces that have already been finished?
If it is new material, you probably didn't use fine enough sandpaper. Try
going down to 320 or so, without skipping any grades.
If it is old material, you sanded the old finish off, and you don't have
much of a chance getting it to match. Either sand everything, or don't sand
at all. That will require a little more care in using the filler, but can