The whole triangle has angles of 90, 22.62, and 67.38 degrees.
It has a total area of 32.5 squares = [(13*5)/2].
The yellow section has an area of 7 squares.
The green section has an area of 8 squares.
The blue section is made to appear as if it has an area of 5 squares.
The red section is made to appear as if it has an area of 12 squares.
That all adds up to 32. The blue and red squares do not actually have areas of 5 and 12 squares respectively. This is an illusion created by the drawn hypotenuse being very thick. This conceals the fact that the points shared by the blue and red triangles both before and after the shuffle do not actually fall on intersections of grid lines.
That accounts for half of the lost square.
For the other half, pay attention to the hypotenuse while the shapes are being shuffled around. The entire triangle gets bigger.