Add ![CDATA] to permalink rss

The problemn and its solution is very similar to the other question. You are using get_post_type_archive_link() incorrectly. That function accept only one parameter and it is the post type identifier for what you want to get the archive link, and I’m almost sure that get_query_var('job_listing') does not return a post type identifier.

For example, if the post type is job_listing, the use of get_post_type_archive_link() should be:

$permalink = get_post_type_archive_link( 'job_listing' );

Note that get_post_type_archive_link() returns false if the post type is registered with 'has_archive' => false or, what it is your cse, if the post type identifier is not valid.

Also, take in account that the value returned by the_permalink_rss filter is escaped using esc_url(), as you can see in the source code of the_permalink_rss() funciton,, so it is probably that you can not get the result you want because, I think, that function tries to escape a valid URL but a string starting with <!CDATA is not a valid URL. You can perform this simple test to see what I mean:

$test="<![CDATA[ https://example.com/some-post ]]>";
// Outputs string(0) ""
var_dump( esc_url( $test ) );

$test="https://example.com/some-post";
string(29) "https://example.com/some-post"
var_dump( esc_url( $test ) );