you'd have to take the original shader that unity applies to the image component and modify that to maintain all the other features it has.
in the builtin pipeline, you can do that by going to the "unity download archive" website, navigate to your unity version, go to your platform (like "windows" dropdown) and download the builtin shaders
#Shader prevents masking
1 messages · Page 1 of 1 (latest)
make an image component in the scene, check what shader the applied default material there has, then find that shader in the builtin shader archive. unzip that somewhere on your drive
then edit the shader file to include what you want, import that into unity (actually, rename the shader name in the file, then import it in unity and do your trial and errors from there)