Bats do not avoid damage sources, such as lava, cacti, or even campfires, when flying around. This might be intended since bats are annoying.
Minecraft 1.14.4 2019-09-23 16-39-18.mp4
Bat AI doesn't try to avoid lava/fire or is very bad at it
Bats flying over lava sometimes catch on fire
Bees and parrots don't avoid lava