Why are tree rings the same if rainfall is different from place to place?
The rings are not only affected by time but also by location. So no, the patterns are not always the same depending where you are. Climate do affect the rings.

Typically a major factor affecting ring patterns is the seasonality. Depending on the number of rainy season, you might observe one or two rings per year.

If interested, here is an introduction to dendrochronology (from the University of Victoria).