Help Needed with SwiftUI: Custom Button Animation Issue

I’m trying to create a custom animation for a button in SwiftUI, but the animation doesn’t seem to trigger properly when the button is pressed. I’ve followed the standard approaches using withAnimation, but the button only occasionally animates. Has anyone encountered this issue? Are there specific guidelines or common pitfalls in SwiftUI for button animations that I might be missing? Any insights would be appreciated!

Help Needed with SwiftUI: Custom Button Animation Issue
 
 
Q