Phase transformation under direct laser writing in a YAG single crystal