This website actually has a pretty good set of Bar Coin Operated 8-ball rules under the Billiard Rules tab at the top to the screen, (except for a typo at the end that needs to say that the shooter loses if the 8-ball jumps off the table or is pocketed in the wrong pocket)
Here is your answer.
You should never lose a game of 8-ball for scratching UNLESS the 8-ball ends off the surface of the table for some reason (jumped or pocketed) on your shot.
Example of NOT losing the game: You have 1 Stripe/High ball left and you make that ball, the cue then goes around the table and scratches. This is not a loss, the next player has ball in hand ANYWHERE on the table.
Example of NOT losing the game: You have pocketed all of your group, you are shooting at the 8-ball, you miss the 8-ball entirely and the cue ball goes into a pocket scratching. You did not lose, the next player has ball in hand ANYWHERE on the table.
Example of NOT losing the game: You are shooting at the 8-ball, you hit the 8-ball, missing the shot, the cue ball flies off the table and hits someone, but the 8-ball is still on the table, NOT a loss, next player has ball in hand ANYWHERE on table.
Getting the picture yet?
Example of actually losing the game: You Shoot at the 8-ball, hitting the 8-ball first, making the 8-ball into the correct called pocket, but the cue ball follows the 8-ball into the pocket, scratching. You would lose here because you fouled/scratched on the same shot you pocketed the 8-ball.
The game can only be WON one way. Pocketing the 8-ball into the called pocket without fouling or scratching on the shot.
The game can be LOST several ways: You can make the 8 in the wrong pocket, you can jump the 8 off the table, you can pocket the 8 before you have finished pocketing your own balls first, you fouled by hitting your opponents ball first before pocketing the 8-ball, you scratched ON THE SAME SHOT as pocketing the 8.
But a game of 8-ball is NEVER over if the 8-ball is still on the table.