Function Composition and Domain

We are learning about Rational Functions, Function Composition, and Domain in Algebra 2. I was attempting to use Desmos to model relationships with students.

In the picture below, f(x) and g(x) are inverses of one another, so composing them should yield the line y=x for all values of the domain of the function composition. You can see that Desmos correctly identifies j(1) as undefined, but is somehow getting an answer for h(0)…

To make matters worse, if I rewrite g(x) in another form, Desmos gets answers for both j(1) and h(0):

Can anyone explain what is happening here? Is there a way to fix it so that Desmos displays that both are undefined?

Am I correct that this is not the correct math to be displayed?

here’s a simpler example of that behaviour:

https://www.desmos.com/calculator/3koxj6dn64

so when the value makes the function continuous it is accepted as a value even though it is not acutally in the domain of the function …