Lucas Herbert has lost his lead at The Open Championship, but he remains in contention to claim his first major title.