Dropdown not working unless list type is changed

I am adding selection options dropdowns using code. The dropdown options in my second dropdown are created depending on the selection made in the first, however the list (second dropdown) does not populate with choices unless the list type is set to “browser” in settings. The first dropdown does not have this problem. Any ideas how to correct?

function uniqueDropdown2() {
    .contains("resourceCategory", $w("#categoryDD").value)
    .then(results => {
        const uniqueTitles = getUniqueTitles(results.items);
        $w("#subjectDD").options = buildOptions(uniqueTitles);
    function getUniqueTitles(items) {
        const titlesOnly = items.map(item => item.resourceSubject);
        return [...new Set(titlesOnly)];
    function buildOptions(uniqueList) {
        return uniqueList.map(curr => {
            return { label: curr, value: curr };