I'm writing some tests to confirm the behavior of my app, you are actually unit testing SwiftData and not your app.
As for the problem, I am not sure it's a bug and that they deliberately keep the object in the ModelContext for a short while to avoid problems for the app using it.
The following test would pass though
#expect(result.isDeleted)
Topic:
App & System Services
SubTopic:
iCloud & Data
Tags: