Britain's Oliver Bearman has locked in his Formula 1 future by signing an extension to remain with the Haas team through the 2027 season.