Yes. When it comes to ex-spouse benefits, Social Security doesn’t care about the marital status of your former spouse; it only cares about your marital status.
Ex-spousal benefits are earned by being a partner in a marital unit for at least 10 years. Your status as a partner in that unit stands, whether or not your ex-husband or ex-wife marries again. However, if you remarry and become part of a new marital unit, your eligibility for benefits based on the previous unit ends.
Keep in mind
There is a narrow exception to the remarriage rule. You can continue to collect benefits on a living ex-spouse’s record if your new husband or wife is drawing certain types of Social Security — specifically, survivor benefits, divorced-spouse benefits or childhood disability benefits.