The role validity for Customer and Supplier roles of Business Partner is not considered in S/4HANA
SAP S/4HANA Cloud
In S/4HANA Cloud, Business Partner supports time dependency for role assignment using valid-from and valid-to dates. For Customer and Supplier roles, although time dependency can be maintained like for any other BP role, this time dependency is not relevant for any application, including CVI. Applications like Sales, Procurement etc. will process the BP's Customer and Supplier data independent of the role's validity.
This behaviour is as per design. Applications in S/4HANA rely on the underlying Customer and Supplier data although the maintenance access is done using the linked Business Partner.
3076803 - S/4HANA Business Partner: Role validity for Customer and Supplier roles
S/4HANA Cloud Business Partner, BP, Time-dependency, Customer, Supplier, CVI, S4_PC , KBA , LO-MD-BP , Business Partners , Problem