Hi there,
I would suggest following the best practices for configuring Windows Defender Firewall.
Windows Defender Firewall with Advanced Security provides host-based, two-way network traffic filtering and blocks unauthorized network traffic flowing into or out of the local device. Configuring your Windows Firewall based on the following best practices can help you optimize protection for devices in your network.
You can also follow the steps as per the forum and see if it is Helpful
https://social.technet.microsoft.com/Forums/windows/en-US/f2bf0f58-6332-44ec-81c9-61e2b42097dd/firewall-rule-doesnt-work?forum=win10itpronetworking
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
--If the reply is helpful, please Upvote and Accept it as an answer--