Sort by template, but retain manual sort order

I’ld like to sort a page’s subpages by template first, but then have them appear as set in the manual sort.

$page->children()->listed()->sortBy("template", "desc") works, but then it loses the manual sort order entirely.
I thought $page->children()->listed()->sortBy("template", "desc", "sort", "asc") would do this, but then I get an error:

Kirby\Exception\PermissionException 
…/src/Cms/PageRules.php117

FYI: When I use $page->children()->listed()->sortBy("sort", "asc") I get the same error?

Should be sortBy('num'), not sort, I think.

You are right again, @texnixe. Thanks!