The astrophotography mode on Pixels (the only way to get 4 min exposure in the default camera app) works by taking quite a few photos with shorter exposures and then matching them up in post processing.
You even get a short animation at the end where every captured photo gets processed using the rest, so you can see stars moving around during the capture.
Wait there's an astral photography mode on the pixels? I've gotten some half decent star photos with just the night shot mode and 2 second exposure, but I'll have to look for it next time I'm outside at night.
It's somewhat hidden if you don't know where to look. You have to switch to Night sight mode, turn on astrophotography in the settings, and then set the phone down on a stable surface. After a few seconds without any movement, the capture button will change from moon to three stars and pressing it will start the 4 minute capture.