Fiction is a huge, unwieldy word that's mostly useful as the converse of non-fiction. It communicates virtually nothing useful to a potential reader, which is the entire purpose of genre categorizations.
That's inaccurate. SF/Fantasy contains elements which are not possible under the laws of physics, not anything imaginary. Literary fiction is also imaginary, but taking place in "our world".
(The lines get blurrier when talking about imagined historical fiction, or even things like alternative fiction.)
Strictly speaking you don't have to have elements not possible under the laws of physics. I would definitely call The Martian science fiction, but it doesn't really try to break any physical laws.
Even things like Tau Zero are using relativistic time dilation as the plot driver.
I agree, and sometimes the line is drawn between SF being "things that are theoretically possible" vs. Fantasy where things are impossible. But then you have things like Egan's Clockwork Trilogy, which is "what if the laws of physics actually worked a bit differently in this specific way" but which I assume anyone would consider SF. As opposed to Brandon Sanderson's books, which could be described in a similar way, but are usually categorized Fantasy.
At the end, it's mostly a marketing and feeling thing. As one of my favorite authors put it, the different between SF and Fantasy sometimes comes down to - are you putting a tree or a spaceship on the cover of your book?
I think some books can cross the threshold and be both, but the majority fall into one or the other category pretty easily. That would seem to apply to the linked authors' books from a cursory glance.
What would you say is the reason for categorising works differently? Can you see differences there or do you also think it's mostly marketing?
Sure, but my point being that saying SF/Fantasy contains elements that aren't possible is a too restrictive constraint - a whole lot of SF would fall outside of that category.
While Tau Zero that was mentioned elsewhere is believed to not match the laws of nature now, the science the entire plot rests on was considered scientifically plausible at the time it was written.
It was speculative, but it explicitly did not set out to make up a world in which some scientific law is different.
In other words, that isn't a defining factor of SF.
The speculative nature of it is closer to it - hence the shared label of speculative fiction often used to group SF and fantasy.
A common sf theme is "here is this change to the laws of physics, what would our universe then look like". Eg Arrival (and the story it's based on), tons of books by Egan, any book with FTL.
Which, let's be fair - most science fiction does to some degree.
Even the "hard" sci-fi tends to comprise of the author's one area of expertise or hyperfixation while everything else is nonsense. You'll have descriptions in intricate detail of how the spacecraft are engineered down to the self-sealing stembolts, but biology is basically magic.