Same here with:
Sonoma 14.3.1
M3 Pro
Safari 17.3.1
Selenium 4.18.0
Trying to check/uncheck any of the checkboxes in this public test page (https://the-internet.herokuapp.com/checkboxes), made exactly for this kind of dummy selenium tests, doesn't work.
It works on all browsers but Safari.
The only things working in Safari is clicking with js, which is a horrible workaround:
JavascriptExecutor executor = (JavascriptExecutor) webDriver;
executor.executeScript("arguments[0].click();", firstCheckbox);