Google may have forgotten the Pixel 2 XL, but developers have brought Android 12 to the device in the form of ProtonAOSP. The custom ROM will soon be available for the regular Pixel 2, too.
https://www.notebookcheck.net/The-forgotten-Pixel-2-XL-receives-Android-12-port-through-ProtonAOSP.578744.0.html