The Bug
If there is water nearby, axolotls can pathfind to the water without avoiding holes that are smaller than 2 blocks thick or equal to 2 blocks thick, but more than 4 blocks wide.
Reproduce
To reproduce, dig a big hole that is 2x5 blocks big and A LOT of blocks deep, place water next to the long side of the hole (if there isn't any) like done in the video below and place the axolotl on the other side of the hole. The axolotl will fall into the hole.
Or to reproduce, you need to just follow the instructions of MC-208601 and instead of lava, dig the 2x5 hole.
Observed Behavior
Axolotls are able to fall into deep holes when pathfinding to water.
Expected Behavior
Axolotls should not be able to fall into deep holes when pathfinding to water.
Attachments
Comments

Can confirm.
Can confirm in 1.17.
Can confirm in 1.17.1.

Appears to not be fixed in 21w37a

Affects 21w38a

I can confirm not fixed in 21w37a
watch this video
https://www.youtube.com/watch?v=cOSIGSJMy70&ab_channel=PhoenixSC
I am also able to confirm that this issue isn't fixed in 21w37a, therefore I'm requesting for this ticket to be reopened. Here are some extra details regarding this problem.
[media]The Bug:
Axolotls can sometimes fall into deep holes when pathfinding to water.
Steps to Reproduce:
Build the setup as shown in the attachment below.
Summon an axolotl on each of the diamond blocks.
Wait around thirty seconds.
→ ❌ Notice how axolotls can sometimes fall into deep holes when pathfinding to water.
Observed Behavior:
Axolotls are able to fall into deep holes when pathfinding to water.
Expected Behavior:
Axolotls should not be able to fall into deep holes when pathfinding to water.

Affects 21w39a (also, I found out this wasn't fixed before it was cool 😎 /s)

Affects 21w40a

Affects 21w43a

Affects 1.18-pre1
Can confirm that this issue is still present in 1.18 Pre-release 6.
[media]Can confirm in 1.18.1.

Affects 22w06a
Can confirm in 1.18.2.
Can confirm in 21w11a. Relates to MC-249232.
I'd like to request for this ticket to be reopened as this issue doesn't appear to be fixed in 22w16b. You can reproduce this by building the attached setup and summoning an axolotl on top of the diamond block.
[media][media][media]I'm still able to reproduce this on occasion in 22w18a. See my above comment.

In 22w19a.

This issue hasn't been updated since 30/May/22. It is now harder to reproduce, but i still could do it in 1.19 and 22w24a after a couple of attempts, so i added those versions to the issue.