This is specific to GPL-style licences. You would have to meet the terms of the GPL anyway (i.e. provide your modified source code under the same licence).
The commercial licence is just an additional option for companies willing to pay to not adhere to the GPL terms.
There are certainly cases where maintainers have started licensing _new_ versions of a project under different, non-open source terms (Terraform, ElasticSearch etc.). But you're free to continue using any code that was released under the old licence.
There are some badly written licences which make it ambiguous whether the licence can be revoked in future (e.g. Wizards of the Coast with the OGL), but I have rarely seen this raised as a concern in a software context.
The commercial licence is just an additional option for companies willing to pay to not adhere to the GPL terms.
There are certainly cases where maintainers have started licensing _new_ versions of a project under different, non-open source terms (Terraform, ElasticSearch etc.). But you're free to continue using any code that was released under the old licence.
There are some badly written licences which make it ambiguous whether the licence can be revoked in future (e.g. Wizards of the Coast with the OGL), but I have rarely seen this raised as a concern in a software context.
(IANAL, this is not legal advice, etc.)