This Seeking Tech walkthrough will show you how to beat Captain LeFwee without getting hit in Sly 3: Honor Among Thieves (2024) on PS5 and PS4.
Use the following video guide as a reference:
For the first phase, you can avoid his low attack by jumping. Afterwards, you can do a high attack, by pressing Triangle, when he blocks low.
For the second phase, you can dodge his high attack by tilting the left analog down. You can then do a low attach, by pressing Square, when he blocks high.
For the third phase, he will use a combination of the aforementioned offensive and defensive moves.
Hopefully, you should get the hang of animations from the previous phases, so that you can beat Captain LeFwee without taking damage.