Shader doesn't work in a particular case

I assume you are drawing many things in your draw method. Think of it this way, the effect has to be executed on each and everything that you draw independently, which means it’s being executed many times when you run it on the whole thing.

If you’re using a render target, it only has to be executed once. If the effect is the same either way you do it, and you’re going to be using a render target anyway, it makes sense to do it on the render target.

There may be a way to do it without render targets, but I look at this way, your 256*256 pixel art game is going to run just fine on most things if you’re a little unoptimized at the cost of being lazy.

Can’t tell what your code is doing wrong but deferred should be able to work with effects if you’re using it properly.

Maybe read this