Do you call attention for an officer while in a maintenance shop?

You're supposed to, but it really comes down to the unit. Officers and Warrant Officers of that unit - who are prone to going in and out of that shop - will most likely be a bit more lax on that policy, understanding that the enlisted personnel in that shop are going to be in situations where it may be very inconvenient to suddenly stop and assume the position of attention. But if, say, the Brigade or Division Commander suddenly walks into that maintenance shop, you'd better believe they're going to expect personnel in that shop to come to the position of attention as they enter.
You're supposed to, but it really comes down to the unit. Officers and Warrant Officers of that unit - who are prone to going in and out of that shop - will most likely be a bit more lax on that policy, understanding that the enlisted personnel in that shop are going to be in situations where it may be very inconvenient to suddenly stop and assume the position of attention. But if, say, the Brigade or Division Commander suddenly walks into that maintenance shop, you'd better believe they're going to expect personnel in that shop to come to the position of attention as they enter.