Update: partly resolved in Maple 2023. int_warning.mw still does not show the warning
There is a very helpful warning about using assumptions from the int command that does not appear in the attached case:
Warning, unable to determine if -1 is between 0 and x0; try to use assumptions or use the AllSolutions option
Warning, unable to determine if 1 is between 0 and x0; try to use assumptions or use the AllSolutions option
Using infolevel[int]:=5 in Maple 2022.2, one can see that the integrals listed under int/ellalg/elltype are not the same.
My preference would be to have this warning always working. It's a reminder that Maple cannot give a general answer but that there might be solutions for a restricted real domain. The warning also does not reproduce when execution the corresponding help page
(Update: the warning reproduces in Maple 2023)
Sidenote: This kind of warning is so useful that I wonder if and how such warnings could be extended beyond integration with piecewise solutions. (Maybe also to other commands. Maple often returns input unevaluated because there is no general solution in the complex domain, without informing the inexperienced user that there might be solutions available in the real domain.)