No, Github webhooks are managed by the repository owners, and they are used to update web services as pushes and other actions occur in the repository. It’s not at all practical to have repository owners install webhooks for every Discourse site that might have onebox links to their issues and pull requests.
A very similar thing will happen if you link to a specific commit in a Github repository, and then that commit is removed. Or if you link to a branch and the branch is removed or renamed. The onebox content is a snapshot from the moment when the post was made, it’s not a live preview of the content at the time the post is read.
I agree with @codinghorror that it’s probably not a good idea to link to transitory content, but even the Discourse developers do it, so maybe something could be done to improve the presentation. Possibly include the date/time that the onebox was captured in its display, so the user can see that it’s not current?