You must terminate your dryer vent outside the building according to section m1502 of the irc.
Dryer vent through attic to soffit.
Considering that back pressure higher than 6 wci is generally recognized as inefficient you can see that venting through the roof with non dryer specific vents is immediately problematic.
Common 1 4 screens are ineffective and should be replaced or retrofitted.
And given the expectations for soffit venting and roof venting these days if an attic space is properly vented it would almost for sure preclude the soffit venting of any exhaust.
Alternatively cover all existing vent openings with 1 8 inch or 1 16 inch wire mesh.
Range hoods shall discharge to the outdoors through a single wall duct.
The duct serving.
Avoid installing the dryer vent termination cap in a soffit overhang under a roof.
Soffit vents are intake vents so any air exhausted at that point will likely be sucked back up into the attic.
The clouds of water vapor can easily find their way into the attic through soffit vents cracks or any other small opening.
If an exhaust vent is too close to an intake some of that moist warm air is headed in to the attic.
Air shall not be exhausted into an attic soffit ridge vent or crawl space.
This also means that you can t blow the dryer exhaust into the attic or the crawlspace.
I assume that your laundry is in an interior space and venting directly through an exterior wall is impossible.
Not a good thing.
I usually recommend to have a dryer vent exit the home most anywhere but within a soffit.
Also the dryer and the bathroom fans should be vented separately and should never be vented out the soffit vent.
Doing so would fill your attic with warm moist air that could rot the framing.
The vent cover still allows for proper maintenance and cleaning because of the box design and should prove to be more than difficult for rodents to gain access to the dryer venting.
The less back pressure is created by the roof vent the more efficiently the system performs.
Instead fresh air still flows in through the soffit vents and travels along the underside of the sheathing until it reaches a ridge vent or can be vented with another type of exhaust vent.
The international residential code allows you to run a dryer vent through the attic but you can t terminate it there.