One checkbox or two radio buttons? Is there a case where both are acceptable?

I read an interesting article talking about the philosophy behind the use of checkboxes versus radio buttons. Of course, in most cases you would argue that the decision is pretty obvious because radio buttons are predominantly used for a single mandatory selection from a number of options (of a reasonable size hopefully) while checkboxes are for non-mandatory multiple selection from a number of options.

Of course, at the end of such articles, the author notes that the answer to the question is that it really depends on the use case as I described previously.

I wonder if there actually is an affect or difference that asking yes/no questions using radio buttons or checkboxes has on the users, since the article gathers a lot of opinions and ideas but it would be interesting to see actual research on this.

Also, I have a suspicion that there might be cases in which there is no difference how the user input is collected, even though we are used to certain types of questions being asked one way (e.g. opt-in/opt-out using checkboxes) and certain types of questions being asked another way (e.g. gender using radio buttons). I supposed the problem is that you have to ask a question in the affirmative or negative with checkboxes, so maybe there is no scenario in which both options can be equivalent.