This is extremely rare in the US judicial system, and prosectors tend not to like take cases where the victim or a key witness is no longer willing to testify.
Yes, judges and lawyers for both parties in a case can legally compel witnesses to show up and testify, but doing so tends to damage the credibility of the witness, which can be fatal for their testimony.