There are two things that keep me from counting Hyrule Castle as a proper dungeon, and I am probably technically wrong on this (although I think I've seen Axle argue convincingly that City in the Sky is the last full dungeon in TP) but here they are: (1) There is no item in the dungeon. (2) It can't be completed and saved. This is a little nit-picky on my part, I know, but I think it is part of the reason why I just don't feel the area leading up to the boss is a true dungeon--it is, by nature, only complete when the boss is beaten and the game is over. Which means any time I go back into my save file, I still haven't finished that "dungeon."
Additionally, with Hyrule Castle, although it is much more like a dungeon than other final dungeon-type areas in other Zelda titles, it is very easy to skip the vast majority of the dungeon by accident and the mini-bosses don't feel like true mini-bosses to me, especially as the mini-bosses in TP in general tend to be very clearly defined. In Hyrule Castle it's just a series of larger enemies that have been encountered previously (some as true mini-boses). All in all, I feel like it is a very cool area leading up to the boss, it just doesn't feel like a full fledged dungeon to me