in my case I had to first delete the VPN Gateway that has both the public IPs attached. After vpn gateway is deleted i was able to delete public ip.