I can't speak to the actual algorithm, but Photoshop also does various types of color space conversions unless you explicitly set it not to. I didn't see anywhere in the article where that was mentioned, or whether Photopea does those same conversions.
I hope that Photoshop does not do any conversion, when it is not necessary. Color space conversion is performed e.g. when changing saturation, vibrance etc. But I think it is not necessary in this case.