TCP and UDP service ports don't work

You can say that.

IPv4 isn’t allocated by default, IPv6 is… But connecting (raw TCP/UDP) over IPv6 also fails when IPv4s aren’t allocated: Announcement: Shared Anycast IPv4 - #17 by Seventhnadir

Allocate an IPv4 (costs $2/mo), and see if the example then works?

flyctl ips allocate-v4 -a <app-name>