Flex items default to min-width: auto, which means "never shrink below my content's intrinsic size". An unbreakable string has a large intrinsic size, so the item refuses to shrink and overflows.
Override it on the child:
In Tailwind that is min-w-0. The same applies vertically in a column flex container with min-h-0, which is the usual reason a scrollable panel inside a flex column won't scroll.