It sounds like your custom format is actual a Date&Time format. There is no format I know of for durations that will pad a leading zero onto the hours. There are a few options. Three are below. I think the third is the least error prone and easiest but it isn't quite what you want.
First way:
If you format this column as text before entering any durations they will sort correctly as text. You will have to type the entire duration, including leading zeros and colons. 7:21:30 is not the same as 07:21:30 when sorting. If you will ever go into the hundreds of hours, all of them must have three digits for the hours (007:21:30, 108:29:32, 000:00:12, etc) to sort correctly.
If you have a few values already entered, you cannot simply reformat them as text. It might be easiest to delete them and enter them again after the column is text. If you have a lot of them entered already, a formula can be used to convert them into text "durations" in a temporary other column so you can copy/"paste formula results" to the original column.
As text, they are not durations or numeric. If you need them as durations for downstream functions, add a new column where you multiply the text "duration" by 1. That will convert them into durations. Use that column in formulas and then hide it.
Second way:
Format the column as duration before entering any data. Enter your durations into each cell as 7h21m30s. It will not pad a 0 to the left of the hours. You will get 7:21:30 not 07:21:30. Do not enter the durations using colons. If you do, Numbers will think they are dates, regardless of how you formatted the cell and that you are using 0:00:00 format for the durations. Stupid, yes, but that's how it is.
Third way
It seems like Numbers prefers the 7h 21m 30s format for durations. Use that format for the column. Enter the durations in that format (the spaces are not required for data entry). It will not mistake them as dates. It will sort them correctly. You can use them in formulas and functions. All around it is much easier.