Observable macro causes custom layout to update unnecesarily

In the following example code, I am trying to update the value of an Observable object. But some how this triggers an infinite loop of updating globalValue.value:

import SwiftUI

@Observable class GlobalValue
{
    var value: Double = 0
}

let globalValue = GlobalValue()

struct TestLayout: Layout
{
    func sizeThatFits(proposal _: ProposedViewSize, subviews _: Subviews, cache _: inout ()) -> CGSize { .zero }

    func placeSubviews(in bounds: CGRect, proposal _: ProposedViewSize, subviews: Subviews, cache _: inout ())
    {
        globalValue.value += 1
        print(globalValue.value)
    }
}

struct ContentView: View
{
    var body: some View
    {
        TestLayout { Text("A") }
    }
}

#Preview
{
    ContentView()
        .padding(50)
}

What is causing the infinite loop when using @Observable?

Edit: Deleted ObservableObject example. That one was a mistake.

I think maybe it's because the increment += has an implicit read so maybe that is considered as a dependency of globalValue. Because of this dependency, a notification loop is formed. But I am not sure how things work with @Observable.