Although PBW and StarSan is good for their intended purposes, it is best to use products designed for what you are trying to do. They might work in a pinch but there are products designed for better serving line cleaning and a better overall result for your beer…
Beer Line Cleaner (BLC) is best for general cleaning and flushing between kegs or on a regular basis, whatever your “regular” is and that’s up to you. Not sure what the industry standard is but I’d suggest after every keg or series of kegs of the same product. More frequent cleaning prevents buildups that are more difficult to clean.
Acid Line Cleaner (ALC) for a deeper clean in combination with BLC when needed for buildups. Not a solution in itself, but a nice tool to add.
If we only have a hammer, every problem starts to look like a nail, so properly equip your toolbox with the proper tools for the job. I think it’s natural for us to try and use the first things we learn about in cleaning and sanitation when doing new things, but in many cases there are better things to use that will give the proper benefits.