Physics problem with a technique solution. Cream cheese frosting is genuinely heat-sensitive - it will ALWAYS loosen in a warm room, so the game is building it strong and keeping it cold.
The build: whip the cream to properly STIFF peaks first (the flip-the-bowl test), then fold the softened cream cheese in - the whipped cream's structure is what holds everything up, and under-whipped cream is the most common soup source. Everything cold: bowl, cream, the room if you can manage AC. Make it FRESH the day you frost - this frosting doesn't improve overnight, it sulks.
The life rules: frosted cake goes back into the fridge promptly and LIVES there - cream cheese cakes are refrigerated products, full stop, displayed cold and sold with a keep-refrigerated line. Delivery in the cool hours or with cold packs.
Your piping was never the problem. The counter was 🙂