For all practical purposes, liquids do NOT expand, and this is a determining factor in the use of hydraulic brakes instead of mechanical. What causes problems is the introduction of gases in the brake system, such as from the change of state of the brake fluid (ultra-low vapor pressure - miniscule contribution), but mostly from contaminants - such as absorbed water. Air in the lines is another contributor. It is safe to say the cause of what is happening to royaiii is NOT expanding brake fluid - look elsewhere.
Perhaps a ruptured seal in the power brake mechanism is sucking fluid out, trapping it, and allowing it to return when the engine is off. VERY bad brake fluid contamination might also be an issue, but I would expect dragging brakes or other accompanying symptoms.