As long as the replacement tank has a capacity of more than 5 liters it's okay for Modified class. You might, for instance, elect to change the shape of the stock tank to allow the rider to get into a better tuck. That's common. Another way that's been tried to circumvent the maximum of 5L rule is to "stuff" the more-than-5L tank with something -- maybe an inner tube, for instance -- and have the resulting capacity be less than 5L. It's a lame way to do it and is highly frowned upon -- to the point that you might just have a difficult time getting through inspection that way.