A workaround can be to create a Virtual Layer"Virtual Layer" through Layer > Add Layer > Add/Edit Virtual Layer... with the columns you want to show, and identify this layer instead:
For example:
select kommunnamn, lanskod, geometry
from ok_ak_riks
select kommunnamn, lanskod, geometry
from ok_ak_riks
