I can't see the Extractor or Ejector marks on the case to be sure, but it looks like what I've seen several times before.
Understand the dynamics of what's happening,
The extractor (Claw on the slide, you can see it from outside) isn't holding the case long enough for the EJECTOR (a pin sticking up usually from the frame) to throw it clear of the action.
Either the claw has crud under it, so it's not getting a good bite,
The claw is rounded over, not getting a good bite on the rim of the round,
Or the spring is weak, again, not getting a good grip on the rim of the round.
This could also be an EJECTOR, the pin that throws the case out of the action,
Being just a hair too short, chipped away a little, or bent backwards a little.
The extractor *Should* get a grip on the rim of the case,
Hold the case until the case contacts the Ejector SOLIDLY.
At that point, the case mouth is free of the chamber and the Ejector can flip the case out of the weapon, the claw of the Extractor looses grip as the case rotates out from the impact with the Ejector.
Short Ejector (for what ever reason) and a weak extractor claw will just flip the case around backwards.
I had the same issues before, wasn't even the firearm, it was a batch of brass with thick rims, the case wouldn't release from the claw correctly.
Guys with 1911's see a version of this, the 'Stove Pipe Jam', where the case lets go too soon and doesn't hit the Ejector hard enough, the case stands straight up and looks like a 'Stove Pipe'.