Hi, @Anonymous you have full control of your private IP so you should be able to retain, or at least update after the fact to the original private IP.
However, with Public IPs, unless part of an IP Prefix, your point here - "disassociate the ips from the old one and assign them to the new one" - is where you will lose the existing Public IP.
The actual IPv4 address is assigned to the resource at allocation. Hence, deallocation will cause it be returned to the pool. There is no workaround for this at present.
Joe