I modified your code to this and this works.
<script setup>
import CompA from './CompA.vue'
import { ref, getCurrentInstance } from 'vue'
const components = getCurrentInstance().appContext.components;
// I do NOT want to use [CompA, CompA] because my inputs are strings
const componentTreeName = [CompA, CompA]
</script>
<template>
<h1>Demo</h1>
<template v-for="compName in componentTreeName">
<component :is="compName"></component>
</template>
</template>