Looking at the repair, I think the problem is that you've not re-masked the area at each step. What I mean to say is, when I paint a small part of a panel, I'll prep the area I intend to paint. I'll then mask of a slightly larger area and apply the primer. Once the primer has gone off and is ready to be flatted back, I'll remove the masking and flat the primer with a finer grade of paper (wetted wet and dry with a tiny bit of dish soap in the water bucket - keep re-wetting it) over the whole primed area and slightly into the paint around the repair.
I'll then mask off and apply base coat over all of the area that I've flatted back (not just the primer). I'll then remove the masking once more and when the base coat has gone off, use an even finer paper wet (it can't be too wet or wetted too often) to flat back the base coat and again a small amount of the surrounding area. I'll then mask an area larger than the flatted back area, apply clear coat and then, once it's had time to fully go off, polish it with a very very fine, wet paper followed by cutting back the entire panel.
You may call this "feathering" the edges of the repair. What you absolutely need to avoid in a hard line between the repair section and the rest of the paint. One really useful tip is to get a rubber sanding block which is properly flat. Don't try to shorten drying times and don't try to do the job quickly. You can get away with a hard masked line at the edge of panels and where there is some feature in the panel. Had I been painting it, I'd probably have used the horizontal line across the panel as the upper limit of the paint and tried to fade the paint at the left and right areas.