Try using the new seaborn style naming convention with matplotlib:
plt.style.use('seaborn-v0_8-whitegrid')
Or use seaborn's direct styling:
import seaborn as sns sns.set_style("whitegrid")