According to the Bootstrap 4 website, Scrollspy has certain requirements for use. One of these requirements is that "Scrollspy requires position: relative on the element you’re spying on, usually the ."
Interestingly, it appears that Scrollspy can still function properly without body {position:relative} when the element being spied upon is the focus.
A Scrollspy example from W3Schools demonstrates this point: W3Schools' Scrollspy example
Even after removing body {position:relative} from the style and running the code, the Scrollspy feature continues to work seamlessly.
Take a look at the non-body{position:relative} version of the W3Schools example here: W3Schools' Scrollspy example without position:relative
I'm curious if anyone can explain why the example functions as intended even when body {position:relative} is not present?