Apple support's online article: Use Guided Access with iPhone, iPad, and iPod touch - Apple Support
says:
End a Guided Access session:
Triple-click the Side or Home button, enter your Guided Access passcode, then tap End.
Or
if you turned on Touch ID or Face ID for Guided Access, double-click the Side or Home button.
Else:
There's a discussion thread online (replying to a similar query for iPad ... link below) that may help:
How do you escape Guided access if the tr… - Apple Community
Eg says:
"When you are stuck in Guided Access mode, you are really stuck as the typical triple tap on the home button to quit out of Guided Access doesn't work. Even a forced exit won't work because the power button and the home button are disabled.
The only way to get out of Guided Access is to press the Home and Power button together for 15 seconds. This should turn off Guided Access by forcibly rebooting your device. Once your device is restarted, you can then go to Settings > Accessibility > Guided Access > Guided Access - and turn off Guided Access if needed."