The code must just simply be checking the 6502 N flag... In which case the fix you applied may be fine, assuming there aren't any other side effects based on the number of lives.
I looked at the disassembly... here is the code.
PlayerLoseLife:
inc DisableScreenFlag ;disable screen and sprite 0 check
lda #$00
sta Sprite0HitDetectFlag
lda #Silence ;silence music
sta EventMusicQueue
dec NumberofLives ;take one life from player
bpl StillInGame ;if player still has lives, branch
lda #$00
sta OperMode_Task ;initialize mode task,
lda #GameOverModeValue ;switch to game over mode
sta OperMode ;and leave
rts
Changing "bpl StillInGame" to "bne StillInGame" should make it so the game only ends when the variable is 0, not 128-255. However, the check will be one less than normal, so test this and see if the game ends when you have one life left instead of 0.
There may another side effect to this simple patch, though. At the end of each world, the game sets the lives to 255 when you press B. It may cause some issue. It looks like it may get set back to 3 when the game restarts anyway, so maybe not.