After rasterizing the sf object and plotting it, I see unexpected blank lines both horizontally and vertically.
tmp_r <- fasterize(tmp_buf, afr_r, field = "rwi", fun = "first") |>
terra::rast()
tmp_buf originally looks like this: tmp_buf
Image after rasterizing: tmp_r
I tried almost every rasterizing method, all resulting in the same unexpected blank lines.