The bug
What I expected to happen was that the cat would exit its sitting position upon being damaged.
What actually happened instead was the cat remained sitting when damaged.
To reproduce this bug:
Spawn/find an untamed cat.
Tame it and click it to place it in its sitting position.
Damage it in any way you see fit.
Code analysis
Code analysis by @unknown can be found in this comment.
Linked issues
relates to 2
Attachments
Comments 14

Can confirm in 21w07a.
Can confirm in 21w13a.
Can confirm in 21w17a.
Can confirm in 1.17.
Can confirm in 1.19 and 22w24a.
Can confirm in 1.19.2.

In 23w14a, they also seem to panic now (unless taking campfire damage) and then sit back down, which is inconsistent with the other pets still
@unknown, I've created a new ticket for that issue which can be found at MC-265381.
This issue was present in 23w06a but no longer occurs in 23w07a, therefore this problem has been fixed in 23w07a. I'm not sure why both 23w14a and 1.20.1 are marked as affected because I wasn't able to reproduce this problem in both of these versions. I can say with confidence though that this problem was fixed in 23w07a so I'm going to resolve this ticket as fixed. I've attached two screenshots to support my claims here.
[media][media]
This is particularly detrimental in the case of drowning, as can be seen in MC-209409.