In Rank Math, you can set the canonical URL on a page-by-page basis. In /wp-admin/
go to either a Page or Post -> Edit Page/Post -> scroll down to RankMath SEO -> click the Advanced tab.
Add the canonical URL of your choice in the field like so:

RankMath, by default, tries to automagically set canonicals for post/pages. Hopefully, that overrides the annotation shown in your screenshot where you've got a CDN relative path. I'm guessing that for some reason RankMath is catching URIs from your CDN, and without seeing one specifically set, its automagical process is setting those as the canonical.
Controlling RankMath Canonical URLs via Functions.php
If that doesn't work, or if you want to be able to modify the canonical dynamically, set a filter in your functions.php
like so:
// Allow changing of the canonical URL.
//@param string $canonical The canonical URL.
add_filter( 'rank_math/frontend/canonical', function( $canonical ) {
return $canonical;
});
For example, this would set to the current page URL:
add_filter( 'rank_math/frontend/canonical', function( $canonical ) {
return home_url( $_SERVER['REQUEST_URI'] );
});
If after attempting all of the above RankMath is still setting CDN relative paths as the canonical URL, the issue is likely specific to your site (which would be off-topic for us to answer here). In such case, you'd want to take this up with your hosting provider and/or CDN customer service.
Quick Side Note About Sitemaps
Also, just an FYI - Google assumes URLs submitted in a sitemap to be canonical. So best practice in general is to always leave non-canonical URLs off of your sitemaps. Unless something has changed, I'm fairly certain that's how it works. I'll look for someone to validate that in the comments.