Animation problem (boolean bug)

I have a bug with animation
When I make two meshes with modifiers:

  1. subdiv
  2. displace
  3. boolean: difference
    And Make second mesh invisible.
    I get some frames in which boolean is set to union
    Second mesh (deducted) becomes part of first mesh and respectively visible :c

I hope the text and screenshots will let you understand the problem because I can’t explain it well in English

Can i fix it?

EDIT: in “bug frames” values “diff.” and “union” change places (logic of work). ie if you put union on the frame with a bug, the object is normally deducted and Vice versa: