Communities around the world are increasingly interested in nature-based solutions to mitigation of coastal risks like coastal forests, but it remains unclear how much protective benefits vegetation provides, particularly in the limit of highly energetic flows after tsunami impact. The current study, using a three-dimensional incompressible computational fluid dynamics model with a fluid-structure interaction approach, aims to quantify how energy reflection and dissipation vary with different degrees of rigidity and vegetation density of a coastal forest. We represent tree trunks as cylinders and use the elastic modulus of hardwood trees such as pine or oak to characterize the rigidity of these cylinders. The numerical results show that energy reflection increases with rigidity only for a single cylinder. In the presence of multiple cylinders, the difference in energy reflection created by varying rigidity diminishes as the number of cylinders increases. Instead of rigidity, we find that the blockage area created by the presence of multiple tree trunks dominates energy reflection. As tree trunks are deformed by the hydrodynamic forces, they alter the flow field around them, causing turbulent kinetic energy generation in the wake region. As a consequence, trees dissipate flow energy, highlighting coastal forests reducing the onshore energy flux of tsunamis by means of both reflection and dissipation.