Hello there.
This is more an issue of headlessUI than react 18, but it may help you understand the effect of the upgrade from react 17 to react 18.
I can't realize why headlessUI components require some code update, and i guess it's already obvious for you guys, but if it is not the case maybe it would be interesting to understand why it breaks this package and then add some extra instructions to the upgrade guide.
tailwindlabs/headlessui#997
Hope it helps,
Thanks!