Ultrafast photoinduced dissipative hydrogen switching dynamics in thioacetylacetone