Source: Lexico Dictionary
Definition: to suffer from being forced to remain in an unpleasant place or situation; to exist in an unpleasant or unwanted situation, often for a long time:
Examples : "he has been languishing in jail since 1974"
After languishing in obscurity for many years, her early novels have recently been rediscovered.
Definition: to involve someone or something in (a difficult situation); to cause someone or an activity to become trapped in a difficult situation:
Example: "the economy is mired in its longest recession since the war"
At the time the country was mired in the Great Depression.
Both terms convey the sense of "being involved or trapped in an unpleasant situation for a long time"
However my gut tells me there is a nuanced distinction between the two terms.