Here are a few things you can try to troubleshoot this issue:
Make sure that the ScrollViewProxy object you are calling scrollTo() on is not nil. If it is nil, this could cause a crash.
Check the values of the arguments you are passing to the scrollTo() method. Make sure that the edge argument is a valid Edge value, and that the animated argument is a Bool.
If you are using the scrollTo() method to scroll to a specific element in the scroll view, make sure that the element is actually within the scroll view's visible bounds. If the element is not visible, the scrollTo() method may not have any effect.
If the problem persists, you may want to try wrapping the call to scrollTo() in a DispatchQueue.main.async {} block, as this can help ensure that the scroll view is updated on the main thread.
Kudos to Chat GPT 😅