What happens is that air is trapped in the line. You can try to bleed it, but you are trying to push air down to the caliper, but the bubbles keep rising to the top. They settle right at the banjo bolt at the master cylinder. You can crack the banjo bolt and bleed it a little right there to burp those bubbles out. Use a paper tower to absorb any fluid that comes out, because as you know, it is death to paint.
Another method that often works well is to pull the brake lever back as far as you can, and tie it there with a bungie for a few minutes. That pushes the bubbles down the line, then they float back up. Then, release the brake lever, and they are pulled into the master cylinder reservoir. Wiggle the brake lever a few times to work the bubbles out, then do the whole thing again. A couple or three times of doing that should clear all the bubbles.
I use a vacuum device for bleeding brakes that sucks the fluid down through the caliper fast enough that it purges all the bubbles. Another method that works really well is reverse bleeding. You can use a pump type oil can, (scrupulously clean, NO oil,) to pump brake fluid into the brake system from the bottom up.