Bastard surname isn't going away after legitimization under a specific circusmtance
Bit of an odd (but thankfully fixable) bug.
I took over the Iron Throne as Tommen after Joffrey got himself assassinated. At that point, Renly and his two kids had been killed by Joffrey, who now owned the Stormlands.
As Tommen, I figured it would be a good idea to legitimize Edric Storm and give him the title. Which I did, but he kept the Storm surname.
I looked up on this subreddit and I found a couple of older threads where people said the bastard surname didn't go away. And I tried the suggestions I found, even did the basic thing of just restarting the game. Nothing worked.
And it's not the first time this happened. I actually noticed it before. Directly legitimizing someone as king seems to keep the bastard surname in place.
Thankfully, I can also suggest a fix.
Shireen was leading an adventurer camp and she was the official head of House Baratheon. So, I gave Edric the bastard trait back and had Shireen legitimize him directly. That worked, he's now Edric Baratheon.
I'm not exactly sure what the game thinks it's going wrong when the king legitimizes someone unprompted, but... Well, at least it's fixable.