position: fixed always fixates an element to some position within its scrolling container. no matter how you scroll its container..
position: sticky basically acts like position: relative until an element is scrolled beyond a specific offset, in which case it turns into position: fixed