Optimal tax rates in endogenous reward mechanisms: An inverted U-shaped impact on sustaining cooperation