After poking around I managed to enable ICMP responses on my Windows 11 machine:

Open Windows Defender Firewall and select Advanced Settings in the sidebar. Switch to Inbound Rules via the Getting Started page or the sidebar. Find the rule named "Core Networking Diagnostics - ICMP Echo Request (ICMPv4-In)" with Profile of "Private, Public" (unless you're on a corporate domain...). You can right-click the rule and Enable Rule.

You might also want to do the same for the IPv6 version named "Core Networking Diagnostics - ICMP Echo Request (ICMPv6-In)". I don't know why Microsoft decided to disable these by default.