Can I create a database on a local folder mapped as a drive
subst is scoped per session. Your command and the instance run on different sessions.

Creating a database on a subst virtual folder does not sound like a good idea. What are you trying to achieve?