Your function normalize2 and the scale() function calculate different things. Below are comparisons of normalize2, scale and a normalize3 function that matches scale().
I am not sure what you mean by "global normalization". Do the examples below do that? If so, you may need to run ungroup() on your data frame before you normalize the avg column.
library(dplyr)
#>
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
#> The following objects are masked from 'package:base':
#>
#> intersect, setdiff, setequal, union
DF <- data.frame(A = 1:5, B = 2:6, avg = 3:7)
normalize2 <- function(x, na.rm = T) (x / max(x, na.rm = T))
DF %>% mutate_at('avg', normalize2) #scale to the max value
#> A B avg
#> 1 1 2 0.4285714
#> 2 2 3 0.5714286
#> 3 3 4 0.7142857
#> 4 4 5 0.8571429
#> 5 5 6 1.0000000
DF %>% mutate_at('avg', ~(scale(.) %>% as.vector)) # scale to mean = 0 sd = 1
#> A B avg
#> 1 1 2 -1.2649111
#> 2 2 3 -0.6324555
#> 3 3 4 0.0000000
#> 4 4 5 0.6324555
#> 5 5 6 1.2649111
DF %>% mutate_at('avg', ~ scale(.)) #same as above, simplified
#> A B avg
#> 1 1 2 -1.2649111
#> 2 2 3 -0.6324555
#> 3 3 4 0.0000000
#> 4 4 5 0.6324555
#> 5 5 6 1.2649111
normalize3 <- function(x, na.rm = TRUE) (x - mean(x, na.rm = TRUE))/sd(x, na.rm = TRUE)
DF %>% mutate_at('avg', normalize3) #manual version of mean = 0 sd = 1
#> A B avg
#> 1 1 2 -1.2649111
#> 2 2 3 -0.6324555
#> 3 3 4 0.0000000
#> 4 4 5 0.6324555
#> 5 5 6 1.2649111
Created on 2020-08-16 by the reprex package (v0.3.0)