It is not supported to add more than one structural directive on one element. You need to use the canonical form using an explicit <template> tag for at least one of them.
Use an extra <ng-container *ngIf="..."></ng-container> or <ng-container *ngFor="..."> element for one of both structural direcives.