I have three episodes of a TV show, all with similar names, but only S03E03 shows up as Raw-HD in Sonarr, the other two show up as HDTV-720p:
Show - S03E01 - Episode Title Raw-HD.ts
Show - S03E02 - Episode Title Raw-HD.ts
Show - S03E03 - Episode Title Raw-HD.ts
There was a difference in how this was added to Sonarr, which might explain what is happening. Episodes 1 and 2 were placed in the series folder and named manually (which works fine for other qualities such as WEBDL-1080p), while episode 3 was imported by Sonarr from a drone folder. That is the only difference I can think of that might have lead to the episodes being marked as different qualities.