Just because Photoshop uses the ProPhoto color space internally, it doesn’t mean what you see on your screen is rendered using ProPhoto color space. It’s almost certainly being converted to sRGB when sent to your screen. So what you see on your screen when working in the ProPhoto color space is the results of your processing instructions applied in ProPhoto and then converted to sRGB to be sent to your screen.
This is because your screen is very unlikely to be able to reproduce the entirety of the ProPhoto color space. Most screens are limited to most or all of sRGB. A few more capable screens can render AdobeRGB, but screens that can render ProPhoto are currently nonexistent and will be for the foreseeable future. You computer’s graphics card knows this and converts the image sent to it to the color space it detects the monitor is capable of rendering before sending that image on to the monitor.
Think of it like your primitive scientific calculator back in the 1970s. It had an eight digit display, but the internal processor kept track of numbers up to a much higher number of significant digits. What you saw on the calculator’s display was the internal number rounded to the nearest number using eight significant digits. But when you multiplied that number by π (pi), it multiplied the internal number by π out to, say, 64 significant digits and preserved the outcome internally out to 64 significant digits to reduce rounding errors in the final answer at the end of all calculations, which was then displayed on the screen to eight significant digits. If you then punched in that number into another calculator, you limited the accuracy of the calculations using the second calculator to the initial number that was entered rounded to eight significant digits. The information in the 9th to 64th significant digits was irretrievably lost when you converted the internal 64-digit number to an 8-digit number and entered it on another calculator.
Beyond that, once an image has been converted and exported using a more restrictive color space, such as from ProPhoto to sRGB, if one converts it to another larger color space the image will only use the portion of the larger color space that also fits within the smaller color space. Any values in the original image that are outside of the more restrictive color space are irretrievably lost once the image has been squeezed into the smaller color space.
The way to make your images look the same in all browsers is to:
- Include the color space profile used when you export an image in the metadata of the exported image file
- Use properly color managed browsers that pay attention to the metadata with regard to color space profiles and are capable of rendering an image in the color space used to export the image
Alternatively, you can always export images intended for viewing using browsers in the sRGB color space so that even browsers with poorly implemented or no color management which tend to always use sRGB, regardless of what the color space profile tag in the EXIF info says, will render them correctly in sRGB. This is generally a good practice for any images you plan to share via web services since many image hosting sites, including pretty much almost all social media hosting sites, strip the EXIF data from images anyway.