this was fixed in 20w11a where "Parrots imitating hostile mobs in peaceful is not that peaceful" (MC - 129137). If you are in peaceful mode, that may be the issue. Otherwise, please say what your game-mode is.
Why did Tails mark this as duplicate? WTF the other report is canceled and the bug still exists
i know this isnt a bug, but go strip mining. that may help, also look at the comment above to post suggestions