The Bug:
Mobs don't panic when burning if standing on blocks placed above water.
This issue was not present in 1.18 Pre-release 1. Below, I've attached two videos that demonstrate the difference in behavior in 1.18-pre1 and 1.18-pre2.
Behavior in 1.18 Pre-release 1 -
[media]Behavior in 1.18 Pre-release 2 -
[media]Steps to Reproduce:
Summon some blocks above a large area of water.
/fill ~ ~-3 ~ ~15 ~-1 ~15 minecraft:polished_deepslate
/fill ~1 ~-2 ~1 ~14 ~-2 ~14 minecraft:water
Whilst standing in the center of the platform you just summoned, summon any mob that's burning, for example, a goat.
/summon minecraft:goat ~ ~ ~ {Fire:100s}
Watch the behavior of the goat closely.
Take note as to whether or not mobs panic when burning if standing on blocks placed above water.
Observed Behavior:
Mobs don't panic when burning if standing on blocks placed above water.
Expected Behavior:
Mobs would panic when burning if standing on blocks placed above water.
Linked issues
Attachments
Comments 6

With goats, they did panic in 1.18-pre1 when burning but with other entities such as cows, they didn't, so with this being said, you may experience varying results depending on what entity is burning.

The issue with goats is probably caused by the fix of MC-223917.
This issue has been fixed in 1.18 Pre-release 3.

Issue is caused by blocks over water. This is still present.
My apologies, this issue still appears to be present. As stated above by @unknown, this problem can be seen when mobs are burning on blocks placed above water. I've amended this ticket accordingly to reflect this information. Thank you 🙂
This affects more mobs then just goats updated the report to reflect this