It seems as though there really is a bug even when properly disentangling iMessage from your devices.
Public Service Message.
iMessage is a great SERVICE. It saves you from needing more SMS services from the phone company and can assist in saving money if you text many iPhone users. It also let’s you seamlessly communicate on a variety of devices including iPhones, iPads, and Mac computers. All with your phone number and/or any email address with which you set it up! That is amazing!
But it also takes user responsibility. If you set up a SERVICE with your phone number, please realize that if you change phones that no longer can utilize the SERVICE, that new phone will not automatically disable the SERVICE from your phone number! This will result in “loss” of messages coming to your new phone with your old phone number. Those messages will only arrive to your other devices using iMessage (iPad, Mac computer).
Maybe Apple can somehow engineer disabling your phone number from a SERVICE with which you agreed to use that phone number. Maybe it can’t. Maybe it should! But in the current environment, please iMessage responsibly. When turning in your old iPhone for a non-Apple device (who would do that?!?), turn off all iMessage SERVICES from the device before getting rid of it! Please! And also remember to turn off that phone number from other devices that utilize that SERVICE.