My bike has the rear brake cable that enters the frame behind the head tube and exit at the rear. The shifter cables are external.
I took it to my local bike shop. The mechanic made several adjustments and it shifted correctly. The rear derailleur did bind up when shifted to the largest rear cog. He said the chain was 2 or 3 links too short. I had a new chain and he installed that correctly for me with the correct number of links.
I will be on it in the morning. It was too late by the time I got home.
He didn’t seem concerned about the bare cable going through the bare frame so I guess it’s not needed.