A build that succeeds does not imply that all known issues with Java 17 have been fixed. It’s just one of the first steps in supporting a new Java version.
See for instance Add support for running openHAB with Java 17 · Issue #1316 · openhab/openhab-distro · GitHub which was only closed with OH4 because there was still more to fix regarding JavaScript compatibility issues and support.