On click of a button, I call a SC which returns the URL. On dynamic success event, I use this function to copy to that URL in clipboard.
So no direct user interaction I suppose.
I’m afraid that the writeText on Safari is limited to user interactions, so you can not do it on the load event. You should first load the server action and then let the user click on a button to copy the result to clipboard. That is how Safari implemented the clipboard api.
I finally did a separate UI/UX for Safari, by identifying the browser by user agent.
Its not the best option, but the task is not very critical so can live with this work-around for now.