The current position of regulators like the FAA is that dropping things off of airplanes in flight is a bad thing. Dropping extremely large and heavy things like engines would be extremely bad. This poses an unacceptable risk to people and property on the ground (or even in the water). Most aircraft with engine fires do not kill anyone on board, so why risk killing people on the ground?
The preferred method of dealing with engine fires is similar to that of fire protection for buildings; take steps to prevent them, and provide methods for putting them out should they start. We don't go blowing up buildings that are on fire just because it might be quicker than putting it out.
So instead manufacturers are required to provide many features to prevent fires. Areas around the engines are separated into zones by firewalls and seals, required to prevent spread of fire. Any flammable fluid is required to be contained and drained, and separated from ignition sources.
If a fire does start, the engines have fire suppression systems installed. The system has to be tested to show that it provides the required suppression to a fire, and the aircraft generally carries enough suppressing agent for at least 2 uses. Even if this doesn't work, the isolation features built in should prevent the fire from spreading, and possibly allow it to burn itself out of fuel or oxygen. In most cases an aircraft is close enough to an airport to land before this becomes an issue.
These measures have been shown to be adequate. When was the last time someone died because of an engine fire on an airplane? Fires are extremely rare, and fires that can't be dealt with by the existing measures are even more rare.
There are many more reasons why dropping engines is a bad idea.
Some designs allow an engine to shear away from the wing in the event of a crash, but this is not designed to work in flight. Aircraft that drop items like weapons in flight require extensive design and testing to make sure that the object will drop away from the aircraft properly. An aircraft in an emergency like an engine fire could be making extreme maneuvers that would make this even more difficult.
Objects like weapons that are designed to be dropped regularly still malfunction. How can you make an engine that's been installed for decades separate reliably? If you are relying on this feature for safety, there will be added cost for designing, installing, and maintaining the system. Those costs could be reduced if you don't rely on the feature as much. But then if the current measures are enough, why accept that extra expense?
Investigators generally take interest in engine fires. If you drop the engine, there goes the best evidence for figuring out how the fire started, and what could have prevented or mitigated it. Something large like an engine would be easier to find than smaller parts, but there is still the risk of loss or damage hindering the investigation. If the problem is bad enough that airplanes are dropping engines, it would be better to fix the problem than address the symptoms.
If you constrain pilots to only dropping an engine over water, this complicates things further. There are already rules about where airliners can dump fuel, but dumping fuel is generally a less stressful situation. The pilots chose to stay in the air and dump fuel, so any emergencies are generally less urgent and they have time and attention for where they could dump fuel. If there's an engine fire that requires jettison of an engine, things are going to be more hectic in the cockpit, and it may not be the best time to be considering where this would be allowed, taking things like trajectory into account. And going back to the cost issue, if this would be limited to only areas over water, you couldn't rely on this option to always be available, so is it worth the cost?
Airliners can fly with an engine shut down, but missing an engine is a different matter altogether. The aircraft is required to be tested and certified in many different conditions with an engine shut down. How can we test this with a missing engine? Do we drop an extremely valuable engine every time we test? Do we just make the flight with one engine, which is still in testing itself? Do we not test, and accept that after going to all the trouble of allowing jettison of an engine, the aircraft may not be controllable in some situations?