Good day.
Since build 5.2.708 it is possible to remove PASSIVE nodes (which were shut down by autoscaling or manually, for example) from CDN using REST API query /cdn/remove_node. Please note that all the CDN nodes should be updated to CDN 2.5 (5.2.708 and later).