All, This particular ‘fix’ is NOT going to stop ALL of the crap getting in.
Let me try to explain....
When the suspension is static as pictured in your post the ‘large hole in question’ is covered by the swing arm brace. The tape you have on the bike as pictured ‘will’ stop most of the crap getting in and this would work ‘if’ the bike was a Hardtail.
However, as soon as you sit on your rear suspended bike the ‘swing arm brace’ as pictured below will move in an upwards curved direction (See the first photo). Also once you start riding the swing arm brace will move up even further as the suspension works its way through its 150mm of travel. This movement upwards exposes the hole which is covered when the bike is static or the rear suspension is locked out to everything that is attached to your spinning rear tyre. At full travel on the rear the hole is completely exposed (See the second photo below) If the hole is not covered or filled with foam everything attached to your spinning rear tyre that is flung off it when next to this hole will find its way in as it is a very BIG hole.
View attachment 7737
At full travel on the rear suspension this is what the hole looks like.
If you were off the bike the black swing arm brace as pictured below (blue on your bike) completely covers this hole.
View attachment 7738