Productivity demands, time pressure, and cognitively demanding construction tasks increase workers' arousal and stress; however, it is not clear how these factors may worsen risk compensation effects and lead to unanticipated hazards. This paper examined the extent to which limited time and increased mental load amplify the risk compensatory behavior of workers. Using an immersive mixed-reality environment to simulate an electrical construction task, this paper applied a promising neuroimaging approach (functional near-infrared spectroscopy- fNIRS) to study changes in individuals' cognitive responses and decision dynamics under normal and stressful conditions. The results showed that workers failed to process surrounding information due to limited cognitive resources, and misperceived potential risks under time pressure and increased mental demand. These cognitive failures then led to increased overreliance on safety protections and at-risk decisions, and decreased safety performance. This paper offers valuable insights into the potential neural mechanism driving risk-taking and risk compensatory behaviors and the importance of counteracting risk compensation bias in the construction industry.