The earliest recollection of this bug is traced back to PAN-OS 8.1.18 - January 08, 2024.
This bug is fixed in PAN-OS versions 9.1.7, 8.1.18.
Fixed an issue where, when initial flows from both directions reached the firewall at the same time, a race condition occurred, which caused the firewall to display the following error message: Duplicate flows detected while inserting , flow with the same key . The flow keys were identical due to the flows having the same SRC and DST ports.
For more information:
https://docs.paloaltonetworks.com/pan-os/8-1/pan-os-release-notes/pan-os-8-1-addressed-issues/pan-os-8-1-18-addressed-issues
https://docs.paloaltonetworks.com/pan-os/9-1/pan-os-release-notes/pan-os-9-1-addressed-issues/pan-os-9-1-7-addressed-issues