Your fence is set right the first time
Every post goes 36 inches deep in wet-poured concrete with bell-bottom footings — below the frost line and past the active soil-movement zone. Galvanized ring-shank fasteners at the rails and pickets. That's the difference between a fence still plumb at year ten and one twisting out of true after a couple of winters.