Why does check_ajax_referer give a 403 error on https websites?

that looks good in my eyes. but i just had the same issue, that’s why i stumbled over your question.

i fixed it in my case with

if (!wp_verify_nonce($_POST['nonce'], 'nonce')) {
    die(__('Security Check failed', 'textdomain'));
}

at the very beginning of my ajax action. no idea, where the 403 issue came from, since it worked on desktop machines, but not on my mobile. weird.. give it a shot and let me know, if this helps.

one other thing i saw in your code, but not sure, if it is causing issues: one time you use single quotes, the other time doubles. try to be consistent here.

wp_verify_nonce()