Why are "done" issues shown inconsistently in the backlog of nextgen project?

While working on a Jira Connect app that integrates with the next-gen board we noticed an annoying inconsistency. It is an inconsistency between the Jira Software web UI, the corresponding REST API and two board configurations.

The difference
The issues, that are in the “Done” status and are in the backlog, are shown/hidden differently for two board configurations.
(Note: the board configurations are actually “features” under “project settings” in nextgen projects.)

Feature settings Jira web UI show these issues? /board/{id}/backlog REST API end-point returns these issues?
backlog enabled, sprints disabled Yes No
backlog enabled, sprints enabled No No

Note: although I understand that it is not very intuitive to keep “done” issue in the backlog, it can perfectly happen so our app is expected to handle this situtation like Jira does.

How should it work?
In my understanding, issues with certain status/resolution:

  1. should not be hidden from the backlog (in the web UI)
  2. should be returned by the “/backlog” REST end-point (consistently with the web UI)

It means that in my understanding it should be “Yes” in all the 4 cells.

Alternatively
Or, if not, then at least the web UI and the REST API end-pount should be consistent (i.e. all “yes” or all “no” in a row above).

What problem does it cause?
Currently we cannot precisely export the issues the user is expected to receive.
(The problem cannot be worked around, at least cannot see how.)

Question
Anyone has any idea or workaround, or am I missing something?

FYI. You can find recent update on this in another thread here - Jira Software Cloud "Get issues for board" REST API does not return the correct issues for boards of next-gen projects - #6 by aagrawal2

@aagrawal2 The ticket linked from that other topic cannot be open!

Here it is - [JSWCLOUD-21514] Jira Software Cloud “Get issues for board” REST API does not return the correct issues for boards of next-gen projects - Create and track feature requests for Atlassian products.