It's not a plot hole, it's a plot point, that makes Judas a complex, tragic character. John 13:27 addresses this a little. You might enjoy Jesus Christ Superstar, which is reasonably based on the text but takes some interpretive liberties, and is set from Judas's troubled point of view.
Interestingly, JCS was controversial among some christians for portraying Judas in a sympathetic light. But the text always did portray him in a more complex manner. He did end up hanging himself in shame over his actions very soon after, for example.
Perhaps in today's era of nonstop marvel superhero movies and super partisan political content, you have become accustomed to simple stories where all the characters and motivations are very black and white. But in older times, people were able to appreciate a good complex story told about complex characters with complex and conflicting motivations and emotions...
PS: King James is a notoriously mediocre translation whose only advantage is nostalgia for English speakers and a false patina of "ancientness" (in fact, the KJV is pretty new compared to the original texts, just as the English language is, obviously). If you are interested in learning more, I would avoid everyday bibles sold to everyday christians and look at textbooks with nice commentaries of the sorts you might see used in a college religion or theology class