get_posts() with custom post type does not work outside page.php

My guess is that there is a filter– pre_get_posts most likely– being applied to the category archive and that that filter is written too broadly, and applies to all queries on the page instead of just the one it is intended for– probably the main query. The correct solution would be to fix that filter, but I can’t say exactly how without seeing the code. I’d guess you need to add if(is_main_query()) {... } but again, that is guessing.

You could remove the filter if you know what its callback is:

remove_filter('pre_get_posts','callback_name');

You would need that just before your query and you might need an add_filter() afterwards, depending on your page structure.

You could also use:

remove_all_filters( 'pre_get_posts` );

But that is really taking a sledge hammer to the problem.