The most egregious example would be when a political ideology or message is inserted into a story in which there's no logical reason it'd be in there. For instance, trying to place heavily feminist leanings (particularly third-wave feminist ideas) in a historical series long before such things started gaining traction rarely ever works. For example, with Boardwalk Empire that I'm currently watching, it bringing up ideas about abortion that would be heavily frowned upon and secretive at best back in the 1920s is pretty immersion breaking for the character arc its involved with.
The most prevalent case tends to be when characters are less so a character and more so a walking ideologue with no interesting traits of their own. If all that one can draw from a character is their sexual orientation, race, gender, etc. with little to say about their personality, motivation, morality, etc. then their characterisation is poor due to favouring appealing to certain groups over creating a believable and interesting character. This also completely fails in the message of most creators that implement them if their goal is to try and have some equality or realism with them, as more often than not they completely fail in doing so by trying to point them out as being something special and different.
This leads into another point in how to avoid it being forced as, depending on what aspect is being implemented, it's best to have it have some impact on the character without being all they have. For instance, something like Casca from Berserk struggling with menstruation on the battlefield and the difficulties of being a woman in warfare is a case of political/social talking points being done right as it both presents a realistic take on this and this flaw leads to changes in the plot that impact the character writing for the better. Another case is with The Sopranos where the reveal of a major character as homosexual leads to genuine repercussions as it would be unrealistic for there to be none in the world of the mafia and leads to his character taking more dynamic turns in the final season that avoid the typical cliches of such a character arc, as well as the implications that another character may have had such leanings as well as how his past influenced him as a person helps explore that theme with the idea of it being a learned behaviour. These are well done takes of social-political elements in a series being explored well, as opposed to something such as Disney Star Wars making Land pansexual despite no inklings of it prior or having two non-binary Jedi despite the Jedi Order being one where its philosophies would very much go against such expression and identity; both being cases that contradict what's established in its world and provide no reason for being part of the plot/characters.
In short, the key to not making a political agenda forced is placing realistic and consistent writing over whatever the message that you want to explore is, which is a core of writing in general. No theme will land well if the plot and characters it's attached to aren't consistently written and deeply explored.