Thank you very much for your answer, that made me revise the cubes background and I realized I had unchecked the option Capture every frame, to work with more resources.
I check it again and works perfectly in exchange for an impressive drop in FPS. There is no way to improve this?