Others have already given and founds plenty of examples where the path length is
Bass's answer gave the initial outline of the proof of maximality, but missed a crucial point:
A solution of length 24 may be possible if we visit the room where the treasure was destroyed as the penultimate step.
For example, a path that starts 51 -> 11 -> 12 -> ... could hypothetically finish with ... -> 42 -> 45 -> 55. If the remaining rooms could be arranged to complete the path, this would
leave only the treasure in room 45 destroyed, and allow recovering all 24 remaining treasures.
Unfortunately, before finding an elegant proof, I resorted to a brute force search program which chooses one of the top row as the treasure to be destroyed by the first 2 moves, and then
sets this as the room to be visited 24th, and the treasure below it as either first or second.
All other decisions by the brute force search are restricted to the up to 5 "available" rooms which still contain treasure and will not cause other treasure to be destroyed (and which link to the adjacent rooms in the sequence according to the rules).
The result was that
plenty of paths of length 24 were found according to the restrictions, but none of them allowed travel to the final non-visited room.
I'd noticed before switching to a brute-force solution that:
once the "to be destroyed" room is chosen, it forces the choice of rooms at each end, for example, when choosing room 45 to be destroyed, room 51 must be visited either first or second. If it is chosen as the first, then 51 -> 53 -> ... is a dead end, with no valid third room, so 51 -> 11 -> 12 -> is forced, and the first genuine choice is between rooms 32 and 22.
Similarly, 45 is connected to 42 and 55 on the bottom row, so these must be in positions 23 and 25 in some order. ... -> 55 -> 45 -> 42 does not have any valid predecessor to 55 (other than taking a room "out of order" and destroying another treasure), so a solution collecting 24 treasures with treasure 45 destroyed must end ... -> 42 -> 45 -> 55.
In fact more choices are "forced", so if treasure 45 is chosen to be destroyed near the start then one of the following is forced:
51 -> 11 -> 12 -> [32/22] -> ... ... -> [31/33] 34 -> 44 -> 42 -> 45 -> 55
53 -> 51 -> 11 -> [14/12] -> ... ... -> [31/33] 34 -> 44 -> 42 -> 45 -> 55
As the brute-force search worked forwards, it instead found that
when it reached room 45 on the 24th turn, it was always via the sequence ... -> 55 -> 15 -> 45 or ... -> 52 -> 55 -> 45, with room 42 having been visited earlier in the sequence.
In addition, the not visited room was always
one of the two rooms on the bottom row which are neither reachable from the room in which the treasure was destroyed, nor in the same "place" as it. i.e. 13 and 21 if room 45 was chosen.
There is probably a much more elegant proof than this brute-force solution, but I'll leave that for someone else to find, however one hint I notice that can probably be exploited in a more elegant proof is that
the grid appears to have a carefully constructed symmetry... the first digits shift one column to the left from one row to the next, and the second digits shift two columns to the left.
In particular this should mean that
the choice of which treasure on the top row is destroyed will be arbitrary, as any solution that destroys one treasure can be converted to one that destroys a different treasure simply by relabelling the rooms.