I can't see exactly how the problem looks like, but I guess the effect is disappearing during the level fadeout to game over/time up, right? So, if it's that case, are you using Ice Man's HDMA 3.5 bugfixes patch? If yes, find these lines:
CodeCMP #$15 ;\ Don't execute HDMA
BCS EndHDMA ;| if game mode over 15
Change #$15 to #$16 and test it (would test it myself but I'm from job so eh). If it works, that should be it.
However, if that doesn't work, then remove these lines. This way, the HDMA won't get disabled during game over/time up fadeout, but will stay active
during the animation as well. So, to effectively disable that
after the fadeout, put the following code in gamemode_init_17:
CodeSTZ $0D9F
LDA #$80
STA $2100
STZ $420C
This way the effects should be disabled in there.