Safari mostly uses the open-source WebKit, except it of course sets all the Mac defines and Apple-specific feature flags, and there’s a bit of extra code sprinkled in internally. On Linux you can get something similar but not exactly the same by using one of the WebKit browsers, such as GNOME Web.
Thanks, just installed Epiphany and was able to reproduce issue with flexbox that only Safari had. Somehow I thought that Safari and WebKit browsers were using a bit different forks of WebKit. That proves me wrong.