I hit the same issue filed in this ticket. I amended the commit message and inserted the correct ID, but, the old commit stays lingering in the ticket with the message: "This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository". A fix to this is much appreciated.
Same issue here, needed to reorganize a ticket and now I can't unlink the PR from the previous ticket and it is messing up all our automation