You need to start by determining your desired carbonation level and desired serving temp. Then look up the regulator setting that will give you that carbonation level.
Once you know your required regulator setting you can then calculate your line length. (Sounds like you had that figured out initially)
Then don't mess with it!
Your problem is that you're trying to troubleshoot a non-issue. The bubbles in the line aren't a problem, and by increasing the pressure, your beer is now overcarbonated. Hence the fast, turbulent pour which knocks all the CO2 out, creating lots of foam and ironically flat beer.
So from here, you'll need to depressurise your keg, (likely multiple times to get back to the correct carbonation level) turn your regulator back down to your correct serving pressure, and it should come good.
Don't keep the current setting and try to compensate by lengthening your lines - you might get a good pour, but the beer will be more like champagne because of the excessive carbonation level.
Hope that helps.