Scheduled actions whose criteria are no longer valid prior to their scheduled execution time are removed from the queue, provided the Process is executed on both creation and editing of the record.
From How Does Salesforce Process Scheduled Actions?:
For processes that start when a record is created or edited, scheduled actions remain in the queue only as long as the criteria for those actions are still valid. If a record no longer matches the criteria, Salesforce removes the scheduled actions for the record from the queue.
However,
For processes that start when a record is created, Salesforce never reevaluates the record with that process. Scheduled actions remain in the queue, even if the record no longer meets the associated criteria when the scheduled actions are executed.