Tame parrots which have been made to sit will start flying if a hostile mob is nearby. They tend to swarm the player and the hostile mob. This is mainly an issue because it makes it very hard not to accidentally kill them while defending yourself, particularly when using a sword, due to sweep attack. They will not always go back to sitting when the mob is killed.
Comments 2
This issue has been resubmitted (MC-118546) with a more accurate description of the problem. This report has been marked 'resolved' so you might prefer to follow the other bug report!
i'm having this issue in the full 1.12 version. it's really annoying