It is safe but not necessarily sufficient. In addition, you may or may not want to do it.
I believe that nVidia PC hardware on Windows doesn’t ever throw VK_SUBOPTIMAL_KHR so it wouldn’t be useful to detect resize there. MoltenVK throws VK_SUBOPTIMAL_KHR like crazy while the window is being resized–you could reallocate but you may want to wait until the resizing stops.