I see a very similar issue. The swift code has a text editor (NSTextView) and as soon as a scroll bar is added, the app crashes with an error like:
[MTLDebugRenderCommandEncoder setRenderPipelineState:]:1616: failed assertion `Set Render Pipeline State Validation
For color attachment 0, the texture sample count (1) does not match the renderPipelineState sampleCount (1065353216).
and a similar-looking stacktrace involving MTLReportFailureand other drawing-related functions like QuartzCore (draw_shape, array_flush, draw_elements, draw etc).
Possibly relevant - this is on an older intel mac with a now-unsupported GPU.
Topic:
UI Frameworks
SubTopic:
SwiftUI