1 pixel gap between maximized windows and background app/desktop

Its seems like theres a 1 pixel gap between maximized windows and background (depending on what app or desktop if no app) and minimize and maximized it again makes it disappear but sometimes come back again

This is usually caused by the app being unmaximized, but sized and positioned by drag to be very nearly the exact size as the window would be when maxmized. When unmaximized, it looks ever so slightly smaller than maximized.
And it will appear as though maximizing it somehow resolves it.

Not all apps have Positiona nd Size memory. Some do, some don't. So this may also explain why not all apps show this effect.
On apps that do, try resizing them, then closing them without maximizing them. See if they remember closed geometry so that they stop appearing nearly-maximized when they are not.

Chrome have positioned size memory but for some reason it was the app that have gap effect, when that things happens even fullscreen youtube video still have that gap (also sometimes that gap can flicker in some case)

and pardon me i think it only caused if the OS was locked/suspended and i think if the OS was lagging because computer don't have enough resources maybe..

I see. That does mean that my suggestion above is not applicable here.

If you are willing, what is your Resolution and refresh rate?