Having a dig online, it seems this is a wider issue with Android Auto on multiple different Android devices. Most likely, it has something to do with Android Auto’s built-in settings and how it interacts with the phone.
Nothing can’t do anything in this situation as it is something controlled by Google, so for now the only option is to connect your phone to Android Auto and then manually turn the lock screen off, if you don’t want the screen on.