The step everyone skips is sanding between coats of joint compound, not just after the final one. Two thin coats with a light sanding between them, each fully dried, gave a far smoother result than one thick coat that always seemed to leave a slight ridge no matter how carefully I applied it.
Priming the patch before painting mattered more than I expected too. Skipping primer on a patch I did last year left a faint flat spot visible under certain light, even after two coats of paint, because the compound absorbed the paint differently than the surrounding wall.
Thin coats, patience between them, and a primer coat, that’s the whole difference between a visible patch and an invisible one.