In the US, it's part of the Copyright Act and it applies regardless of the license. Per 17 USC 203(a)(5):
"Termination of the grant may be effected notwithstanding any agreement to the contrary, including an agreement to make a will or to make any future grant."
That section is part of Chapter 2, which is about /transfer/ of copyright, in whole or in part. The “license” it refers to is a license that provides for /complete transfer/ of a part of the bundle of rights that is normally encompassed in copyright. So, frex, someone could use a “license” to transfer their right to authorize derivative works based on their copyrighted work to, say, their kid. The original author would no longer have any say about authorizing derivative works—only the licensee (their kid) would.
It is these transfers of copyright or partial copyright that the author can terminate after ~35 years.
AFAIK, none of the OSS licenses involve transferring copyright, in whole or in part. The original software creator still retains full copyright of their code. They have merely granted a license to others to use that code in certain ways. I just double-checked and GPL v3.0, frex, explicitly says that this license is built on top of copyright and only has effect for the duration of that copyright, and that the author of the code retains their copyright. The fact that the programmer retains their copyrights is why they can license the code under multiple OSS licenses if they want, or both license the code under an OSS and have a separate commercial agreement with someone else for use of the code in a way that the OSS license wouldn’t allow.
And since people licensing their code under the terms of an OSS license never transferred any part of their copyright to someone else as defined by 17 USC 201, there’s nothing for them to terminate under the terms of 17 USC 203. 17 USC 203(b)(5) explicitly says that these termination rules only apply to chapter 2 transfers, not to other sorts of licenses.
Does this include licenses that say "irreversible" in them?