Carlos Sainz has signed a multi-year contract extension with Williams that will keep him with the team for the 2027 Formula 1 season and beyond.