In the Shadow of Friendship is a relationship quest in Hogwarts Legacy.
You just need to talk to Sebastian in the Undercroft.
Here’s a walkthrough of In the Shadow of Friendship in Hogwarts Legacy.
You will get this quest after you chose to not turn him in when prompted in the quest In The Shadow Of Fate.
Talk to Sebastian in the Undercroft.
He’ll then mention that Anne may not forgive him and he’ll live his life in regret but will try to make amends.
The quest ends here.
Hogwarts Legacy: Poppy Blooms Quest Walkthrough