The issue is that this one: Session::get('errors') returns either array or a string from whatever you return as this ->with() puts whatever you ask for in a flash session.
So this:
'errors' => Session::get('errors') ? Session::get('errors')->getBag('default')->getMessages() : (object)[],
should be just this:
'errors' => Session::get('errors') ?? [],
don't call -getBag() on that one. Unless you use it this way: https://laravel.com/docs/8.x/validation#named-error-bags
Note: withErrors and the second parameter is the name of the bag.