It would be amazing if HA would give such an option. I’m terrified of the day I will have to change my router wifi password and will need to go device by device and set it. I got quite a few Shelly devices and some others too and if HA could solve this for us - it would be amazing!
I don’t know any good workaround but it looks quite hard task to HA as well.It is very device specific. It should be possible with Tasmotas sending password command via MQTT and you should be able to reconfigure all devices together. For ESPHome devices you need to recompile a new firmware and flash them over. Unless you have two WiFi networks already running in parallel, you can’t move them one by one but reconfigure your WiFi password after all devices are reconfigured. There are other gotchas as well like if the new password doesn’t work immediately the device may revert to the old one or start captive portal and you still need to configure them one by one.