Photoshop first convert sRGB to Linear, after that take difference and convert Linear to sRGB, Blender directly compute this operation. If you want you can calculate same method. Separate RGBA, Power 1/2.2 for each channel, DIFFERENCE, Power 2.2 and after Combine RGBA.
In order to mimic the result you get in Photoshop inside Blender’s compositor, I would try setting the color management from ‘filmic’ to ‘standard.’ ‘Standard’ is the default in the VSE.