Yes, you are right. Therefore, it is very strange that the powers of the president in Ukraine are not extended in case of war. Ukraine had a lot of time (since 2014) to pass the necessary laws in parliament. However, they did not do this. This is their mistake that they will have to correct.
Vladimir Putin studied law at the University of St. Petersburg (1970-1975). As a lawyer, he will not sign legally incorrect documents.