When upgrading to glue 1.5.1, we noticed a difference in the handling of indentation because we use glue in the arrow R package for code generation. It's a fairly easy workaround (see apache/arrow#11936) but I couldn't find anything in the merged PRs list or changelog that indicates that this was intentional. A few reprexes that I hope are helpful! It seems like the handling of trailing whitespace changed.
# remotes::install_github("tidyverse/glue")
glue::glue("\n text\n with\n indentation\n \n")
#> text
#> with
#> indentation
#>
glue::glue("\n text\n with\n indentation")
#> text
#> with
#> indentation
# remotes::install_github("cran/glue@1.5.0")
glue::glue("\n text\n with\n indentation\n \n")
#> text
#> with
#> indentation
glue::glue("\n text\n with\n indentation")
#> text
#> with
#> indentation