Nested Elements don't render as expected

Product: PowerShell Universal
Version: 2.6.1
Framework: 3.8.0

We’ve updated our dev environment to 2.6.1 and noticed some odd behaviour with New-UDEndpoint not rendering when it did in 2.5.5.

Below is a simplified example that reproduces the issue we’re seeing.

New-UDDashboard -Title 'Title' -Content {
    New-UDElement -Tag 'div' -Endpoint {
        New-UDElement -Tag 'div' -Content {
            New-UDElement -Tag 'div' -Id 'myDiv' -Endpoint {
                Get-Date
            }
            
            New-UDButton -Text 'Click Me' -OnClick {
                Sync-UDElement -Id 'myDiv'
            }
        }
    }
}

Expected result

As it was in 2.5.5
IIS 2.5.5

Actual result

Running Locally

local 2.6.1

Running on IIS

IIS 2.6.1