Hello friend,
The ping 172.18.0.254 is sent to the CPU for processing, and the traffic policy controls the packets at the forwarding level, and the sending to the CPU cannot be controlled.
So it is normal to be able to ping 172.18.0.254. You can test it with other terminals on this network segment.
In addition, there is a problem with the configuration. According to your needs, the traffic behavior should be permit. If the traffic behavior is deny, whether the ACL is permit or deny, it will be deny in the end.
Hope to help you!