When using Visio 2013, create a new drawing with a vstm template file with password-protected macros, and select the vsdm file when saving the drawing, but the macros are not saved to the file.
But when I enter the protection password in the Visual Basic Editor and open the macro, and then save the file, the macros can be saved in the vsdm file.
Best regards