A long time ago, I had a mstdn.social account and was trying to view a friend’s content on like mastodon.art. I couldn’t see his content via mstdn.social at all, but I could if I just went to mastodon.art. Mastodon.art was not in the list of servers mstdn.social did not federate with. I assumed this was a glitch.
Instead of a glitch on the instance there could be an alternative explanation. Is it possible that you inadvertently muted your friend? This explains that you couldn’t see his content on your time line but when you go to your friends account you can still read it.